{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/comments/227632127","pull_request_review_id":167714703,"id":227632127,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzYzMjEyNw==","diff_hunk":"@@ -0,0 +1,49 @@\n+require \"test_helper\"\n+\n+describe User do\n+\n+  describe 'validations' do\n+\n+    it 'creates a new user' do\n+      user = User.new\n+      expect(user).must_be_instance_of User\n+    end\n+\n+    it \"is a valid username\" do\n+      user = users(:jazz)\n+      expect(user.valid?).must_equal true\n+    end\n+\n+    it 'is an invalid username name blank' do\n+      user = users(:blank)\n+      expect(user.valid?).must_equal false\n+    end\n+\n+    it 'is an invalid length for a username' do\n+      user = users(:tierney)\n+      expect(user.valid?).must_equal false\n+    end\n+\n+    it 'is an invalid username duplicate' do\n+      user = users(:jazz)\n+      user = User.new(username: \"jazztaz\")\n+      expect(user.valid?).must_equal false\n+    end\n+\n+  end\n+\n+  describe 'relations' do\n+      before(:each) do\n+        user = users(:jazz)\n+        work = works(:book2)\n+        user.works << work\n+      end\n+\n+      it \"should have created a relationship\" do\n+        Vote.first.user.must_be_instance_of User","path":"test/models/user_test.rb","position":43,"original_position":43,"commit_id":"9ed11a542c6c70639b8f078084e56b78831ee489","original_commit_id":"9ed11a542c6c70639b8f078084e56b78831ee489","user":{"login":"CheezItMan","id":1177416,"node_id":"MDQ6VXNlcjExNzc0MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1177416?v=4","gravatar_id":"","url":"https://api.github.com/users/CheezItMan","html_url":"https://github.com/CheezItMan","followers_url":"https://api.github.com/users/CheezItMan/followers","following_url":"https://api.github.com/users/CheezItMan/following{/other_user}","gists_url":"https://api.github.com/users/CheezItMan/gists{/gist_id}","starred_url":"https://api.github.com/users/CheezItMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheezItMan/subscriptions","organizations_url":"https://api.github.com/users/CheezItMan/orgs","repos_url":"https://api.github.com/users/CheezItMan/repos","events_url":"https://api.github.com/users/CheezItMan/events{/privacy}","received_events_url":"https://api.github.com/users/CheezItMan/received_events","type":"User","site_admin":false},"body":"This is more testing `Vote` than `User`","created_at":"2018-10-24T03:26:07Z","updated_at":"2018-10-24T03:31:44Z","html_url":"https://github.com/Ada-C10/MediaRanker/pull/21#discussion_r227632127","pull_request_url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/comments/227632127"},"html":{"href":"https://github.com/Ada-C10/MediaRanker/pull/21#discussion_r227632127"},"pull_request":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21","id":222772858,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNzcyODU4","html_url":"https://github.com/Ada-C10/MediaRanker/pull/21","diff_url":"https://github.com/Ada-C10/MediaRanker/pull/21.diff","patch_url":"https://github.com/Ada-C10/MediaRanker/pull/21.patch","issue_url":"https://api.github.com/repos/Ada-C10/MediaRanker/issues/21","number":21,"state":"open","locked":false,"title":"Jazz MediaRanker","user":{"login":"jazziesf","id":13984335,"node_id":"MDQ6VXNlcjEzOTg0MzM1","avatar_url":"https://avatars1.githubusercontent.com/u/13984335?v=4","gravatar_id":"","url":"https://api.github.com/users/jazziesf","html_url":"https://github.com/jazziesf","followers_url":"https://api.github.com/users/jazziesf/followers","following_url":"https://api.github.com/users/jazziesf/following{/other_user}","gists_url":"https://api.github.com/users/jazziesf/gists{/gist_id}","starred_url":"https://api.github.com/users/jazziesf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazziesf/subscriptions","organizations_url":"https://api.github.com/users/jazziesf/orgs","repos_url":"https://api.github.com/users/jazziesf/repos","events_url":"https://api.github.com/users/jazziesf/events{/privacy}","received_events_url":"https://api.github.com/users/jazziesf/received_events","type":"User","site_admin":false},"body":"# Media Ranker\r\nCongratulations! You're submitting your assignment!\r\n\r\n## Comprehension Questions\r\nQuestion | Answer\r\n---      | ---\r\nDescribe a custom model method you wrote. | I wrote two methods one to sort all media by votes for each category and another to sort all media for the spotlight.\r\nDescribe how you approached testing that model method. What edge cases did you come up with? | If work was nil, user was not logged in to vote or create work, vote more than once. \r\nWhat are `session` and `flash`? What is the difference between them? | sessions is a way to keep track of users \"session when they are in a program. Flash sends a one-time messages from controllers to your views.\r\nDescribe a controller filter you wrote. | find_by user control filter since each method had to look for a user by it's id. \r\nWhat was one thing that you gained more clarity on through this assignment? | flash and flash now, what the model knows and how it sends information to the controller. \r\nWhat is the Heroku URL of your deployed application? | https://mediarankerada-app.herokuapp.com/ \r\nDo you have any recommendations on how we could improve this project for the next cohort? | \r\n","created_at":"2018-10-15T03:41:04Z","updated_at":"2018-10-24T03:31:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad6798ac0d8e1c52ea27bf03fb36ead1dd6664bf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21/commits","review_comments_url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21/comments","review_comment_url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-C10/MediaRanker/issues/21/comments","statuses_url":"https://api.github.com/repos/Ada-C10/MediaRanker/statuses/9ed11a542c6c70639b8f078084e56b78831ee489","head":{"label":"jazziesf:master","ref":"master","sha":"9ed11a542c6c70639b8f078084e56b78831ee489","user":{"login":"jazziesf","id":13984335,"node_id":"MDQ6VXNlcjEzOTg0MzM1","avatar_url":"https://avatars1.githubusercontent.com/u/13984335?v=4","gravatar_id":"","url":"https://api.github.com/users/jazziesf","html_url":"https://github.com/jazziesf","followers_url":"https://api.github.com/users/jazziesf/followers","following_url":"https://api.github.com/users/jazziesf/following{/other_user}","gists_url":"https://api.github.com/users/jazziesf/gists{/gist_id}","starred_url":"https://api.github.com/users/jazziesf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazziesf/subscriptions","organizations_url":"https://api.github.com/users/jazziesf/orgs","repos_url":"https://api.github.com/users/jazziesf/repos","events_url":"https://api.github.com/users/jazziesf/events{/privacy}","received_events_url":"https://api.github.com/users/jazziesf/received_events","type":"User","site_admin":false},"repo":{"id":152143954,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIxNDM5NTQ=","name":"MediaRanker","full_name":"jazziesf/MediaRanker","private":false,"owner":{"login":"jazziesf","id":13984335,"node_id":"MDQ6VXNlcjEzOTg0MzM1","avatar_url":"https://avatars1.githubusercontent.com/u/13984335?v=4","gravatar_id":"","url":"https://api.github.com/users/jazziesf","html_url":"https://github.com/jazziesf","followers_url":"https://api.github.com/users/jazziesf/followers","following_url":"https://api.github.com/users/jazziesf/following{/other_user}","gists_url":"https://api.github.com/users/jazziesf/gists{/gist_id}","starred_url":"https://api.github.com/users/jazziesf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jazziesf/subscriptions","organizations_url":"https://api.github.com/users/jazziesf/orgs","repos_url":"https://api.github.com/users/jazziesf/repos","events_url":"https://api.github.com/users/jazziesf/events{/privacy}","received_events_url":"https://api.github.com/users/jazziesf/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jazziesf/MediaRanker","description":null,"fork":true,"url":"https://api.github.com/repos/jazziesf/MediaRanker","forks_url":"https://api.github.com/repos/jazziesf/MediaRanker/forks","keys_url":"https://api.github.com/repos/jazziesf/MediaRanker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jazziesf/MediaRanker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jazziesf/MediaRanker/teams","hooks_url":"https://api.github.com/repos/jazziesf/MediaRanker/hooks","issue_events_url":"https://api.github.com/repos/jazziesf/MediaRanker/issues/events{/number}","events_url":"https://api.github.com/repos/jazziesf/MediaRanker/events","assignees_url":"https://api.github.com/repos/jazziesf/MediaRanker/assignees{/user}","branches_url":"https://api.github.com/repos/jazziesf/MediaRanker/branches{/branch}","tags_url":"https://api.github.com/repos/jazziesf/MediaRanker/tags","blobs_url":"https://api.github.com/repos/jazziesf/MediaRanker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jazziesf/MediaRanker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jazziesf/MediaRanker/git/refs{/sha}","trees_url":"https://api.github.com/repos/jazziesf/MediaRanker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jazziesf/MediaRanker/statuses/{sha}","languages_url":"https://api.github.com/repos/jazziesf/MediaRanker/languages","stargazers_url":"https://api.github.com/repos/jazziesf/MediaRanker/stargazers","contributors_url":"https://api.github.com/repos/jazziesf/MediaRanker/contributors","subscribers_url":"https://api.github.com/repos/jazziesf/MediaRanker/subscribers","subscription_url":"https://api.github.com/repos/jazziesf/MediaRanker/subscription","commits_url":"https://api.github.com/repos/jazziesf/MediaRanker/commits{/sha}","git_commits_url":"https://api.github.com/repos/jazziesf/MediaRanker/git/commits{/sha}","comments_url":"https://api.github.com/repos/jazziesf/MediaRanker/comments{/number}","issue_comment_url":"https://api.github.com/repos/jazziesf/MediaRanker/issues/comments{/number}","contents_url":"https://api.github.com/repos/jazziesf/MediaRanker/contents/{+path}","compare_url":"https://api.github.com/repos/jazziesf/MediaRanker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jazziesf/MediaRanker/merges","archive_url":"https://api.github.com/repos/jazziesf/MediaRanker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jazziesf/MediaRanker/downloads","issues_url":"https://api.github.com/repos/jazziesf/MediaRanker/issues{/number}","pulls_url":"https://api.github.com/repos/jazziesf/MediaRanker/pulls{/number}","milestones_url":"https://api.github.com/repos/jazziesf/MediaRanker/milestones{/number}","notifications_url":"https://api.github.com/repos/jazziesf/MediaRanker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jazziesf/MediaRanker/labels{/name}","releases_url":"https://api.github.com/repos/jazziesf/MediaRanker/releases{/id}","deployments_url":"https://api.github.com/repos/jazziesf/MediaRanker/deployments","created_at":"2018-10-08T20:41:52Z","updated_at":"2018-10-15T21:05:38Z","pushed_at":"2018-10-15T21:05:36Z","git_url":"git://github.com/jazziesf/MediaRanker.git","ssh_url":"git@github.com:jazziesf/MediaRanker.git","clone_url":"https://github.com/jazziesf/MediaRanker.git","svn_url":"https://github.com/jazziesf/MediaRanker","homepage":null,"size":119,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ada-C10:master","ref":"master","sha":"8789cca6c19f09adbc0f536a5a4a302dd4bb5a25","user":{"login":"Ada-C10","id":40303054,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAzMDU0","avatar_url":"https://avatars0.githubusercontent.com/u/40303054?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C10","html_url":"https://github.com/Ada-C10","followers_url":"https://api.github.com/users/Ada-C10/followers","following_url":"https://api.github.com/users/Ada-C10/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C10/subscriptions","organizations_url":"https://api.github.com/users/Ada-C10/orgs","repos_url":"https://api.github.com/users/Ada-C10/repos","events_url":"https://api.github.com/users/Ada-C10/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C10/received_events","type":"Organization","site_admin":false},"repo":{"id":151781635,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE3ODE2MzU=","name":"MediaRanker","full_name":"Ada-C10/MediaRanker","private":false,"owner":{"login":"Ada-C10","id":40303054,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAzMDU0","avatar_url":"https://avatars0.githubusercontent.com/u/40303054?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C10","html_url":"https://github.com/Ada-C10","followers_url":"https://api.github.com/users/Ada-C10/followers","following_url":"https://api.github.com/users/Ada-C10/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C10/subscriptions","organizations_url":"https://api.github.com/users/Ada-C10/orgs","repos_url":"https://api.github.com/users/Ada-C10/repos","events_url":"https://api.github.com/users/Ada-C10/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C10/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Ada-C10/MediaRanker","description":null,"fork":true,"url":"https://api.github.com/repos/Ada-C10/MediaRanker","forks_url":"https://api.github.com/repos/Ada-C10/MediaRanker/forks","keys_url":"https://api.github.com/repos/Ada-C10/MediaRanker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-C10/MediaRanker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-C10/MediaRanker/teams","hooks_url":"https://api.github.com/repos/Ada-C10/MediaRanker/hooks","issue_events_url":"https://api.github.com/repos/Ada-C10/MediaRanker/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-C10/MediaRanker/events","assignees_url":"https://api.github.com/repos/Ada-C10/MediaRanker/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-C10/MediaRanker/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-C10/MediaRanker/tags","blobs_url":"https://api.github.com/repos/Ada-C10/MediaRanker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-C10/MediaRanker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-C10/MediaRanker/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-C10/MediaRanker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-C10/MediaRanker/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-C10/MediaRanker/languages","stargazers_url":"https://api.github.com/repos/Ada-C10/MediaRanker/stargazers","contributors_url":"https://api.github.com/repos/Ada-C10/MediaRanker/contributors","subscribers_url":"https://api.github.com/repos/Ada-C10/MediaRanker/subscribers","subscription_url":"https://api.github.com/repos/Ada-C10/MediaRanker/subscription","commits_url":"https://api.github.com/repos/Ada-C10/MediaRanker/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-C10/MediaRanker/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-C10/MediaRanker/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-C10/MediaRanker/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-C10/MediaRanker/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-C10/MediaRanker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-C10/MediaRanker/merges","archive_url":"https://api.github.com/repos/Ada-C10/MediaRanker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-C10/MediaRanker/downloads","issues_url":"https://api.github.com/repos/Ada-C10/MediaRanker/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-C10/MediaRanker/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-C10/MediaRanker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-C10/MediaRanker/labels{/name}","releases_url":"https://api.github.com/repos/Ada-C10/MediaRanker/releases{/id}","deployments_url":"https://api.github.com/repos/Ada-C10/MediaRanker/deployments","created_at":"2018-10-05T21:48:56Z","updated_at":"2018-10-05T21:53:16Z","pushed_at":"2018-10-19T04:12:32Z","git_url":"git://github.com/Ada-C10/MediaRanker.git","ssh_url":"git@github.com:Ada-C10/MediaRanker.git","clone_url":"https://github.com/Ada-C10/MediaRanker.git","svn_url":"https://github.com/Ada-C10/MediaRanker","homepage":null,"size":44,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":47,"license":null,"forks":48,"open_issues":47,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21"},"html":{"href":"https://github.com/Ada-C10/MediaRanker/pull/21"},"issue":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/issues/21"},"comments":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-C10/MediaRanker/statuses/9ed11a542c6c70639b8f078084e56b78831ee489"}},"author_association":"NONE"}}
{"actor":{"display_login":"CheezItMan"}}