{"action":"created","comment":{"url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/comments/78124784","id":78124784,"diff_hunk":"@@ -0,0 +1,33 @@\n+require 'rails_helper'\n+\n+RSpec.describe Api::V1::Merchants::RevenueController, type: :request do\n+  describe \"GET#index\" do\n+    it 'returns revenue for a specific merchant' do\n+      merchant_one = create(:merchant)\n+      merchant_two = create(:merchant)\n+      invoice = create(:invoice, merchant: merchant_one)\n+      invoice_item = create(:invoice_item, invoice: invoice, quantity: 1, unit_price: 1000)\n+      transaction = create(:transaction, invoice: invoice)\n+\n+      get \"/api/v1/merchants/#{merchant_one.id}/revenue\"\n+      merchant = JSON.parse(response.body)\n+\n+      expect(response.status).to eq(200)\n+      expect(merchant[\"revenue\"]).to eq(\"10.0\")\n+    end\n+\n+    it 'returns the merchant with the highest revenue by date if provided' do\n+      merchant_one = create(:merchant)\n+      merchant_two = create(:merchant)\n+      invoice = create(:invoice, merchant: merchant_one, created_at: \"2016-03-04 11:00:05\")\n+      invoice_item = create(:invoice_item, invoice: invoice, quantity: 1, unit_price: 1000)\n+      transaction = create(:transaction, invoice: invoice)","path":"spec/requests/api/v1/merchants/revenue_controller_spec.rb","position":24,"original_position":24,"commit_id":"d27611c1962490db7bda546c4c0f29d0c3ca17be","original_commit_id":"d27611c1962490db7bda546c4c0f29d0c3ca17be","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Useless assignment to variable - transaction.","created_at":"2016-09-09T03:37:35Z","updated_at":"2016-09-09T03:37:35Z","html_url":"https://github.com/NicoleKMarino/rales_engine/pull/34#discussion_r78124784","pull_request_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34","_links":{"self":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/comments/78124784"},"html":{"href":"https://github.com/NicoleKMarino/rales_engine/pull/34#discussion_r78124784"},"pull_request":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34"}}},"pull_request":{"url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34","id":84589172,"html_url":"https://github.com/NicoleKMarino/rales_engine/pull/34","diff_url":"https://github.com/NicoleKMarino/rales_engine/pull/34.diff","patch_url":"https://github.com/NicoleKMarino/rales_engine/pull/34.patch","issue_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/34","number":34,"state":"open","locked":false,"title":"Merchant tests","user":{"login":"MsJennyGiraffe","id":14857182,"avatar_url":"https://avatars.githubusercontent.com/u/14857182?v=3","gravatar_id":"","url":"https://api.github.com/users/MsJennyGiraffe","html_url":"https://github.com/MsJennyGiraffe","followers_url":"https://api.github.com/users/MsJennyGiraffe/followers","following_url":"https://api.github.com/users/MsJennyGiraffe/following{/other_user}","gists_url":"https://api.github.com/users/MsJennyGiraffe/gists{/gist_id}","starred_url":"https://api.github.com/users/MsJennyGiraffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MsJennyGiraffe/subscriptions","organizations_url":"https://api.github.com/users/MsJennyGiraffe/orgs","repos_url":"https://api.github.com/users/MsJennyGiraffe/repos","events_url":"https://api.github.com/users/MsJennyGiraffe/events{/privacy}","received_events_url":"https://api.github.com/users/MsJennyGiraffe/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-09T03:37:26Z","updated_at":"2016-09-09T03:37:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74918f70aad7cd23409f5866b67a987e5e37526c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34/commits","review_comments_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34/comments","review_comment_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/34/comments","statuses_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/statuses/d27611c1962490db7bda546c4c0f29d0c3ca17be","head":{"label":"NicoleKMarino:merchant_tests","ref":"merchant_tests","sha":"d27611c1962490db7bda546c4c0f29d0c3ca17be","user":{"login":"NicoleKMarino","id":16449672,"avatar_url":"https://avatars.githubusercontent.com/u/16449672?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleKMarino","html_url":"https://github.com/NicoleKMarino","followers_url":"https://api.github.com/users/NicoleKMarino/followers","following_url":"https://api.github.com/users/NicoleKMarino/following{/other_user}","gists_url":"https://api.github.com/users/NicoleKMarino/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleKMarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleKMarino/subscriptions","organizations_url":"https://api.github.com/users/NicoleKMarino/orgs","repos_url":"https://api.github.com/users/NicoleKMarino/repos","events_url":"https://api.github.com/users/NicoleKMarino/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleKMarino/received_events","type":"User","site_admin":false},"repo":{"id":67259497,"name":"rales_engine","full_name":"NicoleKMarino/rales_engine","owner":{"login":"NicoleKMarino","id":16449672,"avatar_url":"https://avatars.githubusercontent.com/u/16449672?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleKMarino","html_url":"https://github.com/NicoleKMarino","followers_url":"https://api.github.com/users/NicoleKMarino/followers","following_url":"https://api.github.com/users/NicoleKMarino/following{/other_user}","gists_url":"https://api.github.com/users/NicoleKMarino/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleKMarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleKMarino/subscriptions","organizations_url":"https://api.github.com/users/NicoleKMarino/orgs","repos_url":"https://api.github.com/users/NicoleKMarino/repos","events_url":"https://api.github.com/users/NicoleKMarino/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleKMarino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NicoleKMarino/rales_engine","description":null,"fork":false,"url":"https://api.github.com/repos/NicoleKMarino/rales_engine","forks_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/forks","keys_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/teams","hooks_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/hooks","issue_events_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/events{/number}","events_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/events","assignees_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/assignees{/user}","branches_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/branches{/branch}","tags_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/tags","blobs_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/languages","stargazers_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/stargazers","contributors_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/contributors","subscribers_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/subscribers","subscription_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/subscription","commits_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/contents/{+path}","compare_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/merges","archive_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/downloads","issues_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues{/number}","pulls_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/labels{/name}","releases_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/releases{/id}","deployments_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/deployments","created_at":"2016-09-02T22:46:57Z","updated_at":"2016-09-06T15:29:23Z","pushed_at":"2016-09-09T03:37:26Z","git_url":"git://github.com/NicoleKMarino/rales_engine.git","ssh_url":"git@github.com:NicoleKMarino/rales_engine.git","clone_url":"https://github.com/NicoleKMarino/rales_engine.git","svn_url":"https://github.com/NicoleKMarino/rales_engine","homepage":null,"size":636,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"NicoleKMarino:develop","ref":"develop","sha":"67e8ad2ecbccf871ed727718cea334274a72fbd0","user":{"login":"NicoleKMarino","id":16449672,"avatar_url":"https://avatars.githubusercontent.com/u/16449672?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleKMarino","html_url":"https://github.com/NicoleKMarino","followers_url":"https://api.github.com/users/NicoleKMarino/followers","following_url":"https://api.github.com/users/NicoleKMarino/following{/other_user}","gists_url":"https://api.github.com/users/NicoleKMarino/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleKMarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleKMarino/subscriptions","organizations_url":"https://api.github.com/users/NicoleKMarino/orgs","repos_url":"https://api.github.com/users/NicoleKMarino/repos","events_url":"https://api.github.com/users/NicoleKMarino/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleKMarino/received_events","type":"User","site_admin":false},"repo":{"id":67259497,"name":"rales_engine","full_name":"NicoleKMarino/rales_engine","owner":{"login":"NicoleKMarino","id":16449672,"avatar_url":"https://avatars.githubusercontent.com/u/16449672?v=3","gravatar_id":"","url":"https://api.github.com/users/NicoleKMarino","html_url":"https://github.com/NicoleKMarino","followers_url":"https://api.github.com/users/NicoleKMarino/followers","following_url":"https://api.github.com/users/NicoleKMarino/following{/other_user}","gists_url":"https://api.github.com/users/NicoleKMarino/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoleKMarino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoleKMarino/subscriptions","organizations_url":"https://api.github.com/users/NicoleKMarino/orgs","repos_url":"https://api.github.com/users/NicoleKMarino/repos","events_url":"https://api.github.com/users/NicoleKMarino/events{/privacy}","received_events_url":"https://api.github.com/users/NicoleKMarino/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NicoleKMarino/rales_engine","description":null,"fork":false,"url":"https://api.github.com/repos/NicoleKMarino/rales_engine","forks_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/forks","keys_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/teams","hooks_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/hooks","issue_events_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/events{/number}","events_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/events","assignees_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/assignees{/user}","branches_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/branches{/branch}","tags_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/tags","blobs_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/languages","stargazers_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/stargazers","contributors_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/contributors","subscribers_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/subscribers","subscription_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/subscription","commits_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/contents/{+path}","compare_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/merges","archive_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/downloads","issues_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues{/number}","pulls_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/labels{/name}","releases_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/releases{/id}","deployments_url":"https://api.github.com/repos/NicoleKMarino/rales_engine/deployments","created_at":"2016-09-02T22:46:57Z","updated_at":"2016-09-06T15:29:23Z","pushed_at":"2016-09-09T03:37:26Z","git_url":"git://github.com/NicoleKMarino/rales_engine.git","ssh_url":"git@github.com:NicoleKMarino/rales_engine.git","clone_url":"https://github.com/NicoleKMarino/rales_engine.git","svn_url":"https://github.com/NicoleKMarino/rales_engine","homepage":null,"size":636,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34"},"html":{"href":"https://github.com/NicoleKMarino/rales_engine/pull/34"},"issue":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/34"},"comments":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/issues/34/comments"},"review_comments":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34/comments"},"review_comment":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/pulls/34/commits"},"statuses":{"href":"https://api.github.com/repos/NicoleKMarino/rales_engine/statuses/d27611c1962490db7bda546c4c0f29d0c3ca17be"}}}}
{"actor":{"display_login":"houndci-bot"}}