{"action":"created","comment":{"url":"https://api.github.com/repos/MattRooney/GnarPow/pulls/comments/45145825","id":45145825,"diff_hunk":"@@ -34,4 +35,29 @@ class AdminDashboardTest < ActionDispatch::IntegrationTest\n     refute page.has_content?('Welcome, Default_user!')\n     assert page.has_content?(\"The page you were looking for doesn't exist.\")\n   end\n+\n+  test 'admin can send an email to all users with daily deal' do\n+    User.create(username: 'MattR', password: 'password', email: 'matt@email.com')\n+    User.create(username: 'Edgar', password: 'password', email: 'edgar@email.com')\n+    User.create(username: 'MattS', password: 'password', email: 'stj@email.com')\n+    create_items_associated_with_orders\n+\n+    admin = User.create(username: 'admin',\n+                        password: 'password',\n+                        role:      1)\n+\n+    visit login_path\n+    fill_in 'Username', with: 'admin'\n+    fill_in 'Password', with: 'password'\n+    click_button 'Login'\n+\n+    ApplicationController.any_instance.stubs(:current_user).returns(admin)\n+    visit admin_dashboard_index_path(admin)\n+\n+    assert page.has_content?('Welcome, Admin!')","path":"test/integration/admin_dashboard_test.rb","position":31,"original_position":31,"commit_id":"90a3ac9e2251e16cad5716dce5f949d1342bc0bf","original_commit_id":"90a3ac9e2251e16cad5716dce5f949d1342bc0bf","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":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-11-18T00:51:16Z","updated_at":"2015-11-18T00:51:16Z","html_url":"https://github.com/MattRooney/GnarPow/pull/88#discussion_r45145825","pull_request_url":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/MattRooney/GnarPow/pulls/comments/45145825"},"html":{"href":"https://github.com/MattRooney/GnarPow/pull/88#discussion_r45145825"},"pull_request":{"href":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88","id":51028028,"html_url":"https://github.com/MattRooney/GnarPow/pull/88","diff_url":"https://github.com/MattRooney/GnarPow/pull/88.diff","patch_url":"https://github.com/MattRooney/GnarPow/pull/88.patch","issue_url":"https://api.github.com/repos/MattRooney/GnarPow/issues/88","number":88,"state":"open","locked":false,"title":"25 deal a day email","user":{"login":"MattRooney","id":11494414,"avatar_url":"https://avatars.githubusercontent.com/u/11494414?v=3","gravatar_id":"","url":"https://api.github.com/users/MattRooney","html_url":"https://github.com/MattRooney","followers_url":"https://api.github.com/users/MattRooney/followers","following_url":"https://api.github.com/users/MattRooney/following{/other_user}","gists_url":"https://api.github.com/users/MattRooney/gists{/gist_id}","starred_url":"https://api.github.com/users/MattRooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattRooney/subscriptions","organizations_url":"https://api.github.com/users/MattRooney/orgs","repos_url":"https://api.github.com/users/MattRooney/repos","events_url":"https://api.github.com/users/MattRooney/events{/privacy}","received_events_url":"https://api.github.com/users/MattRooney/received_events","type":"User","site_admin":false},"body":"we can send an email to all users!","created_at":"2015-11-18T00:51:07Z","updated_at":"2015-11-18T00:51:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb64f57ccb16f8e971550c2b2cf52a5a8d8f5f86","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88/commits","review_comments_url":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88/comments","review_comment_url":"https://api.github.com/repos/MattRooney/GnarPow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MattRooney/GnarPow/issues/88/comments","statuses_url":"https://api.github.com/repos/MattRooney/GnarPow/statuses/90a3ac9e2251e16cad5716dce5f949d1342bc0bf","head":{"label":"MattRooney:25-deal-a-day-email","ref":"25-deal-a-day-email","sha":"90a3ac9e2251e16cad5716dce5f949d1342bc0bf","user":{"login":"MattRooney","id":11494414,"avatar_url":"https://avatars.githubusercontent.com/u/11494414?v=3","gravatar_id":"","url":"https://api.github.com/users/MattRooney","html_url":"https://github.com/MattRooney","followers_url":"https://api.github.com/users/MattRooney/followers","following_url":"https://api.github.com/users/MattRooney/following{/other_user}","gists_url":"https://api.github.com/users/MattRooney/gists{/gist_id}","starred_url":"https://api.github.com/users/MattRooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattRooney/subscriptions","organizations_url":"https://api.github.com/users/MattRooney/orgs","repos_url":"https://api.github.com/users/MattRooney/repos","events_url":"https://api.github.com/users/MattRooney/events{/privacy}","received_events_url":"https://api.github.com/users/MattRooney/received_events","type":"User","site_admin":false},"repo":{"id":45856045,"name":"GnarPow","full_name":"MattRooney/GnarPow","owner":{"login":"MattRooney","id":11494414,"avatar_url":"https://avatars.githubusercontent.com/u/11494414?v=3","gravatar_id":"","url":"https://api.github.com/users/MattRooney","html_url":"https://github.com/MattRooney","followers_url":"https://api.github.com/users/MattRooney/followers","following_url":"https://api.github.com/users/MattRooney/following{/other_user}","gists_url":"https://api.github.com/users/MattRooney/gists{/gist_id}","starred_url":"https://api.github.com/users/MattRooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattRooney/subscriptions","organizations_url":"https://api.github.com/users/MattRooney/orgs","repos_url":"https://api.github.com/users/MattRooney/repos","events_url":"https://api.github.com/users/MattRooney/events{/privacy}","received_events_url":"https://api.github.com/users/MattRooney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MattRooney/GnarPow","description":"","fork":false,"url":"https://api.github.com/repos/MattRooney/GnarPow","forks_url":"https://api.github.com/repos/MattRooney/GnarPow/forks","keys_url":"https://api.github.com/repos/MattRooney/GnarPow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MattRooney/GnarPow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MattRooney/GnarPow/teams","hooks_url":"https://api.github.com/repos/MattRooney/GnarPow/hooks","issue_events_url":"https://api.github.com/repos/MattRooney/GnarPow/issues/events{/number}","events_url":"https://api.github.com/repos/MattRooney/GnarPow/events","assignees_url":"https://api.github.com/repos/MattRooney/GnarPow/assignees{/user}","branches_url":"https://api.github.com/repos/MattRooney/GnarPow/branches{/branch}","tags_url":"https://api.github.com/repos/MattRooney/GnarPow/tags","blobs_url":"https://api.github.com/repos/MattRooney/GnarPow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MattRooney/GnarPow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MattRooney/GnarPow/git/refs{/sha}","trees_url":"https://api.github.com/repos/MattRooney/GnarPow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MattRooney/GnarPow/statuses/{sha}","languages_url":"https://api.github.com/repos/MattRooney/GnarPow/languages","stargazers_url":"https://api.github.com/repos/MattRooney/GnarPow/stargazers","contributors_url":"https://api.github.com/repos/MattRooney/GnarPow/contributors","subscribers_url":"https://api.github.com/repos/MattRooney/GnarPow/subscribers","subscription_url":"https://api.github.com/repos/MattRooney/GnarPow/subscription","commits_url":"https://api.github.com/repos/MattRooney/GnarPow/commits{/sha}","git_commits_url":"https://api.github.com/repos/MattRooney/GnarPow/git/commits{/sha}","comments_url":"https://api.github.com/repos/MattRooney/GnarPow/comments{/number}","issue_comment_url":"https://api.github.com/repos/MattRooney/GnarPow/issues/comments{/number}","contents_url":"https://api.github.com/repos/MattRooney/GnarPow/contents/{+path}","compare_url":"https://api.github.com/repos/MattRooney/GnarPow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MattRooney/GnarPow/merges","archive_url":"https://api.github.com/repos/MattRooney/GnarPow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MattRooney/GnarPow/downloads","issues_url":"https://api.github.com/repos/MattRooney/GnarPow/issues{/number}","pulls_url":"https://api.github.com/repos/MattRooney/GnarPow/pulls{/number}","milestones_url":"https://api.github.com/repos/MattRooney/GnarPow/milestones{/number}","notifications_url":"https://api.github.com/repos/MattRooney/GnarPow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MattRooney/GnarPow/labels{/name}","releases_url":"https://api.github.com/repos/MattRooney/GnarPow/releases{/id}","created_at":"2015-11-09T17:55:11Z","updated_at":"2015-11-12T01:56:13Z","pushed_at":"2015-11-18T00:51:07Z","git_url":"git://github.com/MattRooney/GnarPow.git","ssh_url":"git@github.com:MattRooney/GnarPow.git","clone_url":"https://github.com/MattRooney/GnarPow.git","svn_url":"https://github.com/MattRooney/GnarPow","homepage":null,"size":3736,"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":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"base":{"label":"MattRooney:master","ref":"master","sha":"e1e3dcfbf664249dab8058beaec84d1ab6972b56","user":{"login":"MattRooney","id":11494414,"avatar_url":"https://avatars.githubusercontent.com/u/11494414?v=3","gravatar_id":"","url":"https://api.github.com/users/MattRooney","html_url":"https://github.com/MattRooney","followers_url":"https://api.github.com/users/MattRooney/followers","following_url":"https://api.github.com/users/MattRooney/following{/other_user}","gists_url":"https://api.github.com/users/MattRooney/gists{/gist_id}","starred_url":"https://api.github.com/users/MattRooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattRooney/subscriptions","organizations_url":"https://api.github.com/users/MattRooney/orgs","repos_url":"https://api.github.com/users/MattRooney/repos","events_url":"https://api.github.com/users/MattRooney/events{/privacy}","received_events_url":"https://api.github.com/users/MattRooney/received_events","type":"User","site_admin":false},"repo":{"id":45856045,"name":"GnarPow","full_name":"MattRooney/GnarPow","owner":{"login":"MattRooney","id":11494414,"avatar_url":"https://avatars.githubusercontent.com/u/11494414?v=3","gravatar_id":"","url":"https://api.github.com/users/MattRooney","html_url":"https://github.com/MattRooney","followers_url":"https://api.github.com/users/MattRooney/followers","following_url":"https://api.github.com/users/MattRooney/following{/other_user}","gists_url":"https://api.github.com/users/MattRooney/gists{/gist_id}","starred_url":"https://api.github.com/users/MattRooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattRooney/subscriptions","organizations_url":"https://api.github.com/users/MattRooney/orgs","repos_url":"https://api.github.com/users/MattRooney/repos","events_url":"https://api.github.com/users/MattRooney/events{/privacy}","received_events_url":"https://api.github.com/users/MattRooney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MattRooney/GnarPow","description":"","fork":false,"url":"https://api.github.com/repos/MattRooney/GnarPow","forks_url":"https://api.github.com/repos/MattRooney/GnarPow/forks","keys_url":"https://api.github.com/repos/MattRooney/GnarPow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MattRooney/GnarPow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MattRooney/GnarPow/teams","hooks_url":"https://api.github.com/repos/MattRooney/GnarPow/hooks","issue_events_url":"https://api.github.com/repos/MattRooney/GnarPow/issues/events{/number}","events_url":"https://api.github.com/repos/MattRooney/GnarPow/events","assignees_url":"https://api.github.com/repos/MattRooney/GnarPow/assignees{/user}","branches_url":"https://api.github.com/repos/MattRooney/GnarPow/branches{/branch}","tags_url":"https://api.github.com/repos/MattRooney/GnarPow/tags","blobs_url":"https://api.github.com/repos/MattRooney/GnarPow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MattRooney/GnarPow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MattRooney/GnarPow/git/refs{/sha}","trees_url":"https://api.github.com/repos/MattRooney/GnarPow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MattRooney/GnarPow/statuses/{sha}","languages_url":"https://api.github.com/repos/MattRooney/GnarPow/languages","stargazers_url":"https://api.github.com/repos/MattRooney/GnarPow/stargazers","contributors_url":"https://api.github.com/repos/MattRooney/GnarPow/contributors","subscribers_url":"https://api.github.com/repos/MattRooney/GnarPow/subscribers","subscription_url":"https://api.github.com/repos/MattRooney/GnarPow/subscription","commits_url":"https://api.github.com/repos/MattRooney/GnarPow/commits{/sha}","git_commits_url":"https://api.github.com/repos/MattRooney/GnarPow/git/commits{/sha}","comments_url":"https://api.github.com/repos/MattRooney/GnarPow/comments{/number}","issue_comment_url":"https://api.github.com/repos/MattRooney/GnarPow/issues/comments{/number}","contents_url":"https://api.github.com/repos/MattRooney/GnarPow/contents/{+path}","compare_url":"https://api.github.com/repos/MattRooney/GnarPow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MattRooney/GnarPow/merges","archive_url":"https://api.github.com/repos/MattRooney/GnarPow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MattRooney/GnarPow/downloads","issues_url":"https://api.github.com/repos/MattRooney/GnarPow/issues{/number}","pulls_url":"https://api.github.com/repos/MattRooney/GnarPow/pulls{/number}","milestones_url":"https://api.github.com/repos/MattRooney/GnarPow/milestones{/number}","notifications_url":"https://api.github.com/repos/MattRooney/GnarPow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MattRooney/GnarPow/labels{/name}","releases_url":"https://api.github.com/repos/MattRooney/GnarPow/releases{/id}","created_at":"2015-11-09T17:55:11Z","updated_at":"2015-11-12T01:56:13Z","pushed_at":"2015-11-18T00:51:07Z","git_url":"git://github.com/MattRooney/GnarPow.git","ssh_url":"git@github.com:MattRooney/GnarPow.git","clone_url":"https://github.com/MattRooney/GnarPow.git","svn_url":"https://github.com/MattRooney/GnarPow","homepage":null,"size":3736,"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":21,"forks":0,"open_issues":21,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88"},"html":{"href":"https://github.com/MattRooney/GnarPow/pull/88"},"issue":{"href":"https://api.github.com/repos/MattRooney/GnarPow/issues/88"},"comments":{"href":"https://api.github.com/repos/MattRooney/GnarPow/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/MattRooney/GnarPow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MattRooney/GnarPow/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/MattRooney/GnarPow/statuses/90a3ac9e2251e16cad5716dce5f949d1342bc0bf"}}}}