{"action":"created","comment":{"url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments/35232329","id":35232329,"diff_hunk":"@@ -0,0 +1,30 @@\n+require 'rails_helper'\n+\n+RSpec.describe User, type: :model do\n+\n+  context \"#initialize\" do\n+\n+    it \"should initialize the role to standard\" do\n+      user = User.new\n+      expect(user.role).to eq \"standard\"\n+    end\n+\n+  end\n+\n+  context \"role validation\" do\n+\n+    it \"should validate whether a user has a role\" do\n+      user = User.new(role: \"\")\n+      expect(user.valid?).to eq false\n+      expect(user.errors[:role]).to include \"can't be blank\"\n+    end\n+\n+    it \"should have a valid role\" do\n+      user = User.new(role: \"foo\")\n+      expect(user.valid?).to eq false\n+      expect(user.errors[:role]).to include(\"admin\")","path":"spec/models/user_spec.rb","position":25,"original_position":25,"commit_id":"8499fd68250eca852e8b403e6ae8a0f6803ccaf3","original_commit_id":"8499fd68250eca852e8b403e6ae8a0f6803ccaf3","user":{"login":"eliotsykes","id":31698,"avatar_url":"https://avatars.githubusercontent.com/u/31698?v=3","gravatar_id":"","url":"https://api.github.com/users/eliotsykes","html_url":"https://github.com/eliotsykes","followers_url":"https://api.github.com/users/eliotsykes/followers","following_url":"https://api.github.com/users/eliotsykes/following{/other_user}","gists_url":"https://api.github.com/users/eliotsykes/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotsykes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotsykes/subscriptions","organizations_url":"https://api.github.com/users/eliotsykes/orgs","repos_url":"https://api.github.com/users/eliotsykes/repos","events_url":"https://api.github.com/users/eliotsykes/events{/privacy}","received_events_url":"https://api.github.com/users/eliotsykes/received_events","type":"User","site_admin":false},"body":"Line 25 expectation isn't clear in what its purpose is. In addition the error message substring \"admin\" could (one-day) be in multiple validation error messages so this isn't proving the right validation error is being triggered. Consider including the full error message on line 25.","created_at":"2015-07-22T16:23:37Z","updated_at":"2015-07-22T16:23:37Z","html_url":"https://github.com/AbdullahAlger/blocipedia/pull/17#discussion_r35232329","pull_request_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments/35232329"},"html":{"href":"https://github.com/AbdullahAlger/blocipedia/pull/17#discussion_r35232329"},"pull_request":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17","id":40487180,"html_url":"https://github.com/AbdullahAlger/blocipedia/pull/17","diff_url":"https://github.com/AbdullahAlger/blocipedia/pull/17.diff","patch_url":"https://github.com/AbdullahAlger/blocipedia/pull/17.patch","issue_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/17","number":17,"state":"closed","locked":false,"title":"got premium users to upgrade, on to the downgrade","user":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-21T18:11:15Z","updated_at":"2015-07-22T16:23:37Z","closed_at":"2015-07-21T21:01:48Z","merged_at":"2015-07-21T21:01:48Z","merge_commit_sha":"2c14f88ead5b27596a622ef4a0ae59d7a9d62097","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17/commits","review_comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17/comments","review_comment_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/17/comments","statuses_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/8499fd68250eca852e8b403e6ae8a0f6803ccaf3","head":{"label":"AbdullahAlger:premium-standard-users","ref":"premium-standard-users","sha":"8499fd68250eca852e8b403e6ae8a0f6803ccaf3","user":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"repo":{"id":38232952,"name":"blocipedia","full_name":"AbdullahAlger/blocipedia","owner":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AbdullahAlger/blocipedia","description":"","fork":false,"url":"https://api.github.com/repos/AbdullahAlger/blocipedia","forks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/forks","keys_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/teams","hooks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/hooks","issue_events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/events{/number}","events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/events","assignees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/assignees{/user}","branches_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/branches{/branch}","tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/tags","blobs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/{sha}","languages_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/languages","stargazers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/stargazers","contributors_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contributors","subscribers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscribers","subscription_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscription","commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contents/{+path}","compare_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/merges","archive_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/downloads","issues_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues{/number}","pulls_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls{/number}","milestones_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/milestones{/number}","notifications_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/labels{/name}","releases_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/releases{/id}","created_at":"2015-06-29T07:10:46Z","updated_at":"2015-06-29T07:13:51Z","pushed_at":"2015-07-21T23:18:35Z","git_url":"git://github.com/AbdullahAlger/blocipedia.git","ssh_url":"git@github.com:AbdullahAlger/blocipedia.git","clone_url":"https://github.com/AbdullahAlger/blocipedia.git","svn_url":"https://github.com/AbdullahAlger/blocipedia","homepage":null,"size":1936,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AbdullahAlger:master","ref":"master","sha":"ccfadd8b62582086327498ef8848691d8cca94fc","user":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"repo":{"id":38232952,"name":"blocipedia","full_name":"AbdullahAlger/blocipedia","owner":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AbdullahAlger/blocipedia","description":"","fork":false,"url":"https://api.github.com/repos/AbdullahAlger/blocipedia","forks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/forks","keys_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/teams","hooks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/hooks","issue_events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/events{/number}","events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/events","assignees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/assignees{/user}","branches_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/branches{/branch}","tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/tags","blobs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/{sha}","languages_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/languages","stargazers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/stargazers","contributors_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contributors","subscribers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscribers","subscription_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscription","commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contents/{+path}","compare_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/merges","archive_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/downloads","issues_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues{/number}","pulls_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls{/number}","milestones_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/milestones{/number}","notifications_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/labels{/name}","releases_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/releases{/id}","created_at":"2015-06-29T07:10:46Z","updated_at":"2015-06-29T07:13:51Z","pushed_at":"2015-07-21T23:18:35Z","git_url":"git://github.com/AbdullahAlger/blocipedia.git","ssh_url":"git@github.com:AbdullahAlger/blocipedia.git","clone_url":"https://github.com/AbdullahAlger/blocipedia.git","svn_url":"https://github.com/AbdullahAlger/blocipedia","homepage":null,"size":1936,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17"},"html":{"href":"https://github.com/AbdullahAlger/blocipedia/pull/17"},"issue":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/17"},"comments":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/8499fd68250eca852e8b403e6ae8a0f6803ccaf3"}}}}