{"action":"created","comment":{"url":"https://api.github.com/repos/afg419/the_pivot/pulls/comments/52267778","id":52267778,"diff_hunk":"@@ -39,13 +39,51 @@ def setup\n             }\n \n     post(:create, params)\n-    assert_redirected_to character_path(@character)\n \n-    @store.reload\n     @character.reload\n+    @store.reload\n \n     assert_equal [\"dagger\", \"bowling ball\"], @store.items.map{|item| item.name}\n     assert_equal [\"basket\"], @character.items.map{|item| item.name}\n-    assert_equal 7, @character.bank\n   end\n+\n+  test \"create method should update database entries when only buying or selling\" do\n+    create_start_of_game\n+    ApplicationController.any_instance.stubs(:in_game).returns(true)\n+\n+    item_skill_set = SkillSet.create(strength: 1,\n+                                    dexterity: 2,\n+                                 intelligence: 3,\n+                                       health: 4,\n+                                        money: -3,\n+                                        speed: 6)\n+\n+    item1 = Item.create(name: \"dagger\", skill_set: item_skill_set)\n+    item2 = Item.create(name: \"bowling ball\", skill_set: item_skill_set)\n+    item3 = Item.create(name: \"basket\", skill_set: item_skill_set)\n+    @character.items << [item1, item2]\n+    @store.items << item3\n+\n+    params = {\n+              \"classes\"=>\n+                {\n+                  \"0\"=>\n+                    [\"collection-item avatar item player-item-#{item1.id} show\",\n+                     \"collection-item avatar item player-item-#{item2.id} show\"]\n+                },\n+              \"store_id\"=>\"#{@store.id}\",","path":"test/controllers/trades_controller_test.rb","position":39,"original_position":39,"commit_id":"371f66ec191cf8d0832504b672c5ef35474aac60","original_commit_id":"371f66ec191cf8d0832504b672c5ef35474aac60","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Surrounding space missing for operator `=>`.<br>Prefer `to_s` over string interpolation.","created_at":"2016-02-09T04:56:26Z","updated_at":"2016-02-09T04:56:26Z","html_url":"https://github.com/afg419/the_pivot/pull/56#discussion_r52267778","pull_request_url":"https://api.github.com/repos/afg419/the_pivot/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/afg419/the_pivot/pulls/comments/52267778"},"html":{"href":"https://github.com/afg419/the_pivot/pull/56#discussion_r52267778"},"pull_request":{"href":"https://api.github.com/repos/afg419/the_pivot/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/afg419/the_pivot/pulls/56","id":58704138,"html_url":"https://github.com/afg419/the_pivot/pull/56","diff_url":"https://github.com/afg419/the_pivot/pull/56.diff","patch_url":"https://github.com/afg419/the_pivot/pull/56.patch","issue_url":"https://api.github.com/repos/afg419/the_pivot/issues/56","number":56,"state":"open","locked":false,"title":"READY Fixes trading bugs","user":{"login":"afg419","id":13969784,"avatar_url":"https://avatars.githubusercontent.com/u/13969784?v=3","gravatar_id":"","url":"https://api.github.com/users/afg419","html_url":"https://github.com/afg419","followers_url":"https://api.github.com/users/afg419/followers","following_url":"https://api.github.com/users/afg419/following{/other_user}","gists_url":"https://api.github.com/users/afg419/gists{/gist_id}","starred_url":"https://api.github.com/users/afg419/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afg419/subscriptions","organizations_url":"https://api.github.com/users/afg419/orgs","repos_url":"https://api.github.com/users/afg419/repos","events_url":"https://api.github.com/users/afg419/events{/privacy}","received_events_url":"https://api.github.com/users/afg419/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-09T04:32:55Z","updated_at":"2016-02-09T04:56:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7a09ed011b134a4f79f9ef007db1e42ae85726b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/afg419/the_pivot/pulls/56/commits","review_comments_url":"https://api.github.com/repos/afg419/the_pivot/pulls/56/comments","review_comment_url":"https://api.github.com/repos/afg419/the_pivot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/afg419/the_pivot/issues/56/comments","statuses_url":"https://api.github.com/repos/afg419/the_pivot/statuses/371f66ec191cf8d0832504b672c5ef35474aac60","head":{"label":"afg419:fixing_finalizetransaction","ref":"fixing_finalizetransaction","sha":"371f66ec191cf8d0832504b672c5ef35474aac60","user":{"login":"afg419","id":13969784,"avatar_url":"https://avatars.githubusercontent.com/u/13969784?v=3","gravatar_id":"","url":"https://api.github.com/users/afg419","html_url":"https://github.com/afg419","followers_url":"https://api.github.com/users/afg419/followers","following_url":"https://api.github.com/users/afg419/following{/other_user}","gists_url":"https://api.github.com/users/afg419/gists{/gist_id}","starred_url":"https://api.github.com/users/afg419/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afg419/subscriptions","organizations_url":"https://api.github.com/users/afg419/orgs","repos_url":"https://api.github.com/users/afg419/repos","events_url":"https://api.github.com/users/afg419/events{/privacy}","received_events_url":"https://api.github.com/users/afg419/received_events","type":"User","site_admin":false},"repo":{"id":50862502,"name":"the_pivot","full_name":"afg419/the_pivot","owner":{"login":"afg419","id":13969784,"avatar_url":"https://avatars.githubusercontent.com/u/13969784?v=3","gravatar_id":"","url":"https://api.github.com/users/afg419","html_url":"https://github.com/afg419","followers_url":"https://api.github.com/users/afg419/followers","following_url":"https://api.github.com/users/afg419/following{/other_user}","gists_url":"https://api.github.com/users/afg419/gists{/gist_id}","starred_url":"https://api.github.com/users/afg419/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afg419/subscriptions","organizations_url":"https://api.github.com/users/afg419/orgs","repos_url":"https://api.github.com/users/afg419/repos","events_url":"https://api.github.com/users/afg419/events{/privacy}","received_events_url":"https://api.github.com/users/afg419/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afg419/the_pivot","description":"Oregon Trail!","fork":false,"url":"https://api.github.com/repos/afg419/the_pivot","forks_url":"https://api.github.com/repos/afg419/the_pivot/forks","keys_url":"https://api.github.com/repos/afg419/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afg419/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afg419/the_pivot/teams","hooks_url":"https://api.github.com/repos/afg419/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/afg419/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/afg419/the_pivot/events","assignees_url":"https://api.github.com/repos/afg419/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/afg419/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/afg419/the_pivot/tags","blobs_url":"https://api.github.com/repos/afg419/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afg419/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afg419/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/afg419/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afg419/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/afg419/the_pivot/languages","stargazers_url":"https://api.github.com/repos/afg419/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/afg419/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/afg419/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/afg419/the_pivot/subscription","commits_url":"https://api.github.com/repos/afg419/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/afg419/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/afg419/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/afg419/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/afg419/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/afg419/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afg419/the_pivot/merges","archive_url":"https://api.github.com/repos/afg419/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afg419/the_pivot/downloads","issues_url":"https://api.github.com/repos/afg419/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/afg419/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/afg419/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/afg419/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afg419/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/afg419/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/afg419/the_pivot/deployments","created_at":"2016-02-01T18:52:29Z","updated_at":"2016-02-04T20:55:59Z","pushed_at":"2016-02-09T04:55:58Z","git_url":"git://github.com/afg419/the_pivot.git","ssh_url":"git@github.com:afg419/the_pivot.git","clone_url":"https://github.com/afg419/the_pivot.git","svn_url":"https://github.com/afg419/the_pivot","homepage":null,"size":18424,"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":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"afg419:master","ref":"master","sha":"d48a386f51c56950a199a7aebfcd5afe5e5e1fd1","user":{"login":"afg419","id":13969784,"avatar_url":"https://avatars.githubusercontent.com/u/13969784?v=3","gravatar_id":"","url":"https://api.github.com/users/afg419","html_url":"https://github.com/afg419","followers_url":"https://api.github.com/users/afg419/followers","following_url":"https://api.github.com/users/afg419/following{/other_user}","gists_url":"https://api.github.com/users/afg419/gists{/gist_id}","starred_url":"https://api.github.com/users/afg419/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afg419/subscriptions","organizations_url":"https://api.github.com/users/afg419/orgs","repos_url":"https://api.github.com/users/afg419/repos","events_url":"https://api.github.com/users/afg419/events{/privacy}","received_events_url":"https://api.github.com/users/afg419/received_events","type":"User","site_admin":false},"repo":{"id":50862502,"name":"the_pivot","full_name":"afg419/the_pivot","owner":{"login":"afg419","id":13969784,"avatar_url":"https://avatars.githubusercontent.com/u/13969784?v=3","gravatar_id":"","url":"https://api.github.com/users/afg419","html_url":"https://github.com/afg419","followers_url":"https://api.github.com/users/afg419/followers","following_url":"https://api.github.com/users/afg419/following{/other_user}","gists_url":"https://api.github.com/users/afg419/gists{/gist_id}","starred_url":"https://api.github.com/users/afg419/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afg419/subscriptions","organizations_url":"https://api.github.com/users/afg419/orgs","repos_url":"https://api.github.com/users/afg419/repos","events_url":"https://api.github.com/users/afg419/events{/privacy}","received_events_url":"https://api.github.com/users/afg419/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/afg419/the_pivot","description":"Oregon Trail!","fork":false,"url":"https://api.github.com/repos/afg419/the_pivot","forks_url":"https://api.github.com/repos/afg419/the_pivot/forks","keys_url":"https://api.github.com/repos/afg419/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/afg419/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/afg419/the_pivot/teams","hooks_url":"https://api.github.com/repos/afg419/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/afg419/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/afg419/the_pivot/events","assignees_url":"https://api.github.com/repos/afg419/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/afg419/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/afg419/the_pivot/tags","blobs_url":"https://api.github.com/repos/afg419/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/afg419/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/afg419/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/afg419/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/afg419/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/afg419/the_pivot/languages","stargazers_url":"https://api.github.com/repos/afg419/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/afg419/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/afg419/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/afg419/the_pivot/subscription","commits_url":"https://api.github.com/repos/afg419/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/afg419/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/afg419/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/afg419/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/afg419/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/afg419/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/afg419/the_pivot/merges","archive_url":"https://api.github.com/repos/afg419/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/afg419/the_pivot/downloads","issues_url":"https://api.github.com/repos/afg419/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/afg419/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/afg419/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/afg419/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/afg419/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/afg419/the_pivot/releases{/id}","deployments_url":"https://api.github.com/repos/afg419/the_pivot/deployments","created_at":"2016-02-01T18:52:29Z","updated_at":"2016-02-04T20:55:59Z","pushed_at":"2016-02-09T04:55:58Z","git_url":"git://github.com/afg419/the_pivot.git","ssh_url":"git@github.com:afg419/the_pivot.git","clone_url":"https://github.com/afg419/the_pivot.git","svn_url":"https://github.com/afg419/the_pivot","homepage":null,"size":18424,"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":10,"forks":0,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/afg419/the_pivot/pulls/56"},"html":{"href":"https://github.com/afg419/the_pivot/pull/56"},"issue":{"href":"https://api.github.com/repos/afg419/the_pivot/issues/56"},"comments":{"href":"https://api.github.com/repos/afg419/the_pivot/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/afg419/the_pivot/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/afg419/the_pivot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/afg419/the_pivot/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/afg419/the_pivot/statuses/371f66ec191cf8d0832504b672c5ef35474aac60"}}}}