{"action":"created","comment":{"url":"https://api.github.com/repos/netguru/people/pulls/comments/93481909","pull_request_review_id":14010862,"id":93481909,"diff_hunk":"@@ -35,17 +35,43 @@\n       expect{ subject.call }.to change{ user_skill_rate.reload.favorite }.from(false).to(true)\n     end\n \n-    it 'creates new user_skill_rate_content' do\n-      expect{ subject.call }.to change{ user_skill_rate.contents.count }\n+    context \"when user_skill_rate_content doesn't exist today\" do\n+      it 'creates new user_skill_rate_content' do\n+        expect{ subject.call }.to change{ user_skill_rate.contents.count }\n+      end\n+\n+      it 'sets correct values on new content' do\n+        subject.call\n+        user_skill_rate.reload\n+        aggregate_failures do\n+          expect(last_content.favorite).to eq(user_skill_rate.favorite)\n+          expect(last_content.note).to eq(user_skill_rate.note)\n+          expect(last_content.rate).to eq(user_skill_rate.rate)\n+        end\n+      end\n     end\n \n-    it 'sets correct values on new content' do\n-      subject.call\n-      user_skill_rate.reload\n-      aggregate_failures do\n-        expect(last_content.favorite).to eq(user_skill_rate.favorite)\n-        expect(last_content.note).to eq(user_skill_rate.note)\n-        expect(last_content.rate).to eq(user_skill_rate.rate)\n+    context 'when user_skill_rate_content exists today' do\n+      let!(:user_skill_rate_content) do\n+        create(:user_skill_rate_content,\n+          user_skill_rate_id: user_skill_rate.id\n+        )\n+      end\n+\n+      it \"doesn't create new user_skill_rate_content\" do\n+        expect{ subject.call }.to_not change{ user_skill_rate.contents.count }","path":"spec/services/skills/user_skill_rates/update_spec.rb","position":37,"original_position":37,"commit_id":"05557f244cb2eb0becd5f2babdf98e1f88e7024d","original_commit_id":"05557f244cb2eb0becd5f2babdf98e1f88e7024d","user":{"login":"netguru-hound","id":8405163,"avatar_url":"https://avatars.githubusercontent.com/u/8405163?v=3","gravatar_id":"","url":"https://api.github.com/users/netguru-hound","html_url":"https://github.com/netguru-hound","followers_url":"https://api.github.com/users/netguru-hound/followers","following_url":"https://api.github.com/users/netguru-hound/following{/other_user}","gists_url":"https://api.github.com/users/netguru-hound/gists{/gist_id}","starred_url":"https://api.github.com/users/netguru-hound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netguru-hound/subscriptions","organizations_url":"https://api.github.com/users/netguru-hound/orgs","repos_url":"https://api.github.com/users/netguru-hound/repos","events_url":"https://api.github.com/users/netguru-hound/events{/privacy}","received_events_url":"https://api.github.com/users/netguru-hound/received_events","type":"User","site_admin":false},"body":"Space missing to the left of {.","created_at":"2016-12-21T17:24:23Z","updated_at":"2016-12-21T17:24:23Z","html_url":"https://github.com/netguru/people/pull/227#discussion_r93481909","pull_request_url":"https://api.github.com/repos/netguru/people/pulls/227","_links":{"self":{"href":"https://api.github.com/repos/netguru/people/pulls/comments/93481909"},"html":{"href":"https://github.com/netguru/people/pull/227#discussion_r93481909"},"pull_request":{"href":"https://api.github.com/repos/netguru/people/pulls/227"}}},"pull_request":{"url":"https://api.github.com/repos/netguru/people/pulls/227","id":98972515,"html_url":"https://github.com/netguru/people/pull/227","diff_url":"https://github.com/netguru/people/pull/227.diff","patch_url":"https://github.com/netguru/people/pull/227.patch","issue_url":"https://api.github.com/repos/netguru/people/issues/227","number":227,"state":"open","locked":false,"title":"People 138 update user skill rate content if exists","user":{"login":"DariuszMusielak","id":3763916,"avatar_url":"https://avatars.githubusercontent.com/u/3763916?v=3","gravatar_id":"","url":"https://api.github.com/users/DariuszMusielak","html_url":"https://github.com/DariuszMusielak","followers_url":"https://api.github.com/users/DariuszMusielak/followers","following_url":"https://api.github.com/users/DariuszMusielak/following{/other_user}","gists_url":"https://api.github.com/users/DariuszMusielak/gists{/gist_id}","starred_url":"https://api.github.com/users/DariuszMusielak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DariuszMusielak/subscriptions","organizations_url":"https://api.github.com/users/DariuszMusielak/orgs","repos_url":"https://api.github.com/users/DariuszMusielak/repos","events_url":"https://api.github.com/users/DariuszMusielak/events{/privacy}","received_events_url":"https://api.github.com/users/DariuszMusielak/received_events","type":"User","site_admin":false},"body":"# Ticket\r\nhttps://netguru.atlassian.net/browse/PEOPLE-138\r\n\r\n# Description\r\n- user is able to edit his user_skill_rate multiple time during the day. We don't want to create new history each change during one day. Instead of that we find user_skill_rate_content from today and update it.\r\n\r\n### Before merge checklist\r\n- [ ] CircleCI is passing\r\n- [ ] Proper labels are set\r\n\r\n","created_at":"2016-12-21T17:23:18Z","updated_at":"2016-12-21T17:24:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0782a0fd278c7694eb1760d6f82349ff49b62055","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/netguru/people/pulls/227/commits","review_comments_url":"https://api.github.com/repos/netguru/people/pulls/227/comments","review_comment_url":"https://api.github.com/repos/netguru/people/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netguru/people/issues/227/comments","statuses_url":"https://api.github.com/repos/netguru/people/statuses/05557f244cb2eb0becd5f2babdf98e1f88e7024d","head":{"label":"netguru:people-138-update-user-skill-rate-content-if-exists","ref":"people-138-update-user-skill-rate-content-if-exists","sha":"05557f244cb2eb0becd5f2babdf98e1f88e7024d","user":{"login":"netguru","id":1146,"avatar_url":"https://avatars.githubusercontent.com/u/1146?v=3","gravatar_id":"","url":"https://api.github.com/users/netguru","html_url":"https://github.com/netguru","followers_url":"https://api.github.com/users/netguru/followers","following_url":"https://api.github.com/users/netguru/following{/other_user}","gists_url":"https://api.github.com/users/netguru/gists{/gist_id}","starred_url":"https://api.github.com/users/netguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netguru/subscriptions","organizations_url":"https://api.github.com/users/netguru/orgs","repos_url":"https://api.github.com/users/netguru/repos","events_url":"https://api.github.com/users/netguru/events{/privacy}","received_events_url":"https://api.github.com/users/netguru/received_events","type":"Organization","site_admin":false},"repo":{"id":14857326,"name":"people","full_name":"netguru/people","owner":{"login":"netguru","id":1146,"avatar_url":"https://avatars.githubusercontent.com/u/1146?v=3","gravatar_id":"","url":"https://api.github.com/users/netguru","html_url":"https://github.com/netguru","followers_url":"https://api.github.com/users/netguru/followers","following_url":"https://api.github.com/users/netguru/following{/other_user}","gists_url":"https://api.github.com/users/netguru/gists{/gist_id}","starred_url":"https://api.github.com/users/netguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netguru/subscriptions","organizations_url":"https://api.github.com/users/netguru/orgs","repos_url":"https://api.github.com/users/netguru/repos","events_url":"https://api.github.com/users/netguru/events{/privacy}","received_events_url":"https://api.github.com/users/netguru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netguru/people","description":"PeopleApp: easily manage people within the projects!","fork":false,"url":"https://api.github.com/repos/netguru/people","forks_url":"https://api.github.com/repos/netguru/people/forks","keys_url":"https://api.github.com/repos/netguru/people/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netguru/people/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netguru/people/teams","hooks_url":"https://api.github.com/repos/netguru/people/hooks","issue_events_url":"https://api.github.com/repos/netguru/people/issues/events{/number}","events_url":"https://api.github.com/repos/netguru/people/events","assignees_url":"https://api.github.com/repos/netguru/people/assignees{/user}","branches_url":"https://api.github.com/repos/netguru/people/branches{/branch}","tags_url":"https://api.github.com/repos/netguru/people/tags","blobs_url":"https://api.github.com/repos/netguru/people/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netguru/people/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netguru/people/git/refs{/sha}","trees_url":"https://api.github.com/repos/netguru/people/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netguru/people/statuses/{sha}","languages_url":"https://api.github.com/repos/netguru/people/languages","stargazers_url":"https://api.github.com/repos/netguru/people/stargazers","contributors_url":"https://api.github.com/repos/netguru/people/contributors","subscribers_url":"https://api.github.com/repos/netguru/people/subscribers","subscription_url":"https://api.github.com/repos/netguru/people/subscription","commits_url":"https://api.github.com/repos/netguru/people/commits{/sha}","git_commits_url":"https://api.github.com/repos/netguru/people/git/commits{/sha}","comments_url":"https://api.github.com/repos/netguru/people/comments{/number}","issue_comment_url":"https://api.github.com/repos/netguru/people/issues/comments{/number}","contents_url":"https://api.github.com/repos/netguru/people/contents/{+path}","compare_url":"https://api.github.com/repos/netguru/people/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netguru/people/merges","archive_url":"https://api.github.com/repos/netguru/people/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netguru/people/downloads","issues_url":"https://api.github.com/repos/netguru/people/issues{/number}","pulls_url":"https://api.github.com/repos/netguru/people/pulls{/number}","milestones_url":"https://api.github.com/repos/netguru/people/milestones{/number}","notifications_url":"https://api.github.com/repos/netguru/people/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netguru/people/labels{/name}","releases_url":"https://api.github.com/repos/netguru/people/releases{/id}","deployments_url":"https://api.github.com/repos/netguru/people/deployments","created_at":"2013-12-02T08:55:29Z","updated_at":"2016-11-22T04:02:39Z","pushed_at":"2016-12-21T17:23:18Z","git_url":"git://github.com/netguru/people.git","ssh_url":"git@github.com:netguru/people.git","clone_url":"https://github.com/netguru/people.git","svn_url":"https://github.com/netguru/people","homepage":"https://netguru.co/opensource","size":4529,"stargazers_count":45,"watchers_count":45,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":3,"forks":20,"open_issues":3,"watchers":45,"default_branch":"master"}},"base":{"label":"netguru:skills","ref":"skills","sha":"f803018cacb1773dc0c21b116a8ac91abbd10f26","user":{"login":"netguru","id":1146,"avatar_url":"https://avatars.githubusercontent.com/u/1146?v=3","gravatar_id":"","url":"https://api.github.com/users/netguru","html_url":"https://github.com/netguru","followers_url":"https://api.github.com/users/netguru/followers","following_url":"https://api.github.com/users/netguru/following{/other_user}","gists_url":"https://api.github.com/users/netguru/gists{/gist_id}","starred_url":"https://api.github.com/users/netguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netguru/subscriptions","organizations_url":"https://api.github.com/users/netguru/orgs","repos_url":"https://api.github.com/users/netguru/repos","events_url":"https://api.github.com/users/netguru/events{/privacy}","received_events_url":"https://api.github.com/users/netguru/received_events","type":"Organization","site_admin":false},"repo":{"id":14857326,"name":"people","full_name":"netguru/people","owner":{"login":"netguru","id":1146,"avatar_url":"https://avatars.githubusercontent.com/u/1146?v=3","gravatar_id":"","url":"https://api.github.com/users/netguru","html_url":"https://github.com/netguru","followers_url":"https://api.github.com/users/netguru/followers","following_url":"https://api.github.com/users/netguru/following{/other_user}","gists_url":"https://api.github.com/users/netguru/gists{/gist_id}","starred_url":"https://api.github.com/users/netguru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netguru/subscriptions","organizations_url":"https://api.github.com/users/netguru/orgs","repos_url":"https://api.github.com/users/netguru/repos","events_url":"https://api.github.com/users/netguru/events{/privacy}","received_events_url":"https://api.github.com/users/netguru/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netguru/people","description":"PeopleApp: easily manage people within the projects!","fork":false,"url":"https://api.github.com/repos/netguru/people","forks_url":"https://api.github.com/repos/netguru/people/forks","keys_url":"https://api.github.com/repos/netguru/people/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netguru/people/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netguru/people/teams","hooks_url":"https://api.github.com/repos/netguru/people/hooks","issue_events_url":"https://api.github.com/repos/netguru/people/issues/events{/number}","events_url":"https://api.github.com/repos/netguru/people/events","assignees_url":"https://api.github.com/repos/netguru/people/assignees{/user}","branches_url":"https://api.github.com/repos/netguru/people/branches{/branch}","tags_url":"https://api.github.com/repos/netguru/people/tags","blobs_url":"https://api.github.com/repos/netguru/people/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netguru/people/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netguru/people/git/refs{/sha}","trees_url":"https://api.github.com/repos/netguru/people/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netguru/people/statuses/{sha}","languages_url":"https://api.github.com/repos/netguru/people/languages","stargazers_url":"https://api.github.com/repos/netguru/people/stargazers","contributors_url":"https://api.github.com/repos/netguru/people/contributors","subscribers_url":"https://api.github.com/repos/netguru/people/subscribers","subscription_url":"https://api.github.com/repos/netguru/people/subscription","commits_url":"https://api.github.com/repos/netguru/people/commits{/sha}","git_commits_url":"https://api.github.com/repos/netguru/people/git/commits{/sha}","comments_url":"https://api.github.com/repos/netguru/people/comments{/number}","issue_comment_url":"https://api.github.com/repos/netguru/people/issues/comments{/number}","contents_url":"https://api.github.com/repos/netguru/people/contents/{+path}","compare_url":"https://api.github.com/repos/netguru/people/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netguru/people/merges","archive_url":"https://api.github.com/repos/netguru/people/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netguru/people/downloads","issues_url":"https://api.github.com/repos/netguru/people/issues{/number}","pulls_url":"https://api.github.com/repos/netguru/people/pulls{/number}","milestones_url":"https://api.github.com/repos/netguru/people/milestones{/number}","notifications_url":"https://api.github.com/repos/netguru/people/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netguru/people/labels{/name}","releases_url":"https://api.github.com/repos/netguru/people/releases{/id}","deployments_url":"https://api.github.com/repos/netguru/people/deployments","created_at":"2013-12-02T08:55:29Z","updated_at":"2016-11-22T04:02:39Z","pushed_at":"2016-12-21T17:23:18Z","git_url":"git://github.com/netguru/people.git","ssh_url":"git@github.com:netguru/people.git","clone_url":"https://github.com/netguru/people.git","svn_url":"https://github.com/netguru/people","homepage":"https://netguru.co/opensource","size":4529,"stargazers_count":45,"watchers_count":45,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":3,"forks":20,"open_issues":3,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/netguru/people/pulls/227"},"html":{"href":"https://github.com/netguru/people/pull/227"},"issue":{"href":"https://api.github.com/repos/netguru/people/issues/227"},"comments":{"href":"https://api.github.com/repos/netguru/people/issues/227/comments"},"review_comments":{"href":"https://api.github.com/repos/netguru/people/pulls/227/comments"},"review_comment":{"href":"https://api.github.com/repos/netguru/people/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netguru/people/pulls/227/commits"},"statuses":{"href":"https://api.github.com/repos/netguru/people/statuses/05557f244cb2eb0becd5f2babdf98e1f88e7024d"}}}}
{"actor":{"display_login":"netguru-hound"}}