{"action":"created","comment":{"url":"https://api.github.com/repos/imwithsam/the_pivot/pulls/comments/38574636","id":38574636,"diff_hunk":"@@ -1,5 +1,63 @@\n require \"rails_helper\"\n+require \"factory_helper\"\n \n RSpec.describe NotificationsMailer, type: :mailer do\n-  pending \"add some examples to (or delete) #{__FILE__}\"\n+  before do\n+    build_test_data\n+  end\n+\n+  describe \"#customer_order\" do\n+    it \"sends a customer order confirmation email\" do\n+      order_ids = [1, 2, 3]\n+      NotificationsMailer.customer_order(@user_1,\n+                                         order_ids).deliver_later\n+      email = ActionMailer::Base.deliveries.last\n+\n+      expect(email.to).to include(@user_1.email)\n+      expect(email.subject).to eq(\"Your order with Ocho Tickets\")\n+      email.body.parts.each do |part|\n+        expect(part.to_s).to include(\"#{@user_1.full_name},\")\n+        expect(part.to_s).to include(\n+          \"For reference, your order number(s) are: #{order_ids.join(', ')}.\")\n+      end\n+    end\n+  end\n+\n+  describe \"#vendor_order\" do\n+    it \"sends a vendor order confirmation email\" do\n+      order_id = 1\n+      NotificationsMailer.vendor_order(@store_admin_1,\n+                                       @user_1,\n+                                       order_id).deliver_later\n+      email = ActionMailer::Base.deliveries.last\n+\n+      expect(email.to).to include(@store_admin_1.email)\n+      expect(email.subject).to eq(\n+        \"A new order has been placed through Ocho Tickets\")\n+      email.body.parts.each do |part|\n+        expect(part.to_s).to include(\n+          \"#{@store_admin_1.full_name},\")\n+        expect(part.to_s).to include(\n+          \"A new order has been placed through Ocho Tickets by #{@user_1.full_name}.\")\n+        expect(part.to_s).to include(\n+          \"For reference, your order number is: #{order_id}.\")\n+      end\n+    end\n+  end\n+\n+  describe \"#create_new_account\" do\n+    it \"sends a new account creation confirmation email\" do\n+      NotificationsMailer.create_new_account(@user_1).deliver_later\n+      email = ActionMailer::Base.deliveries.last\n+\n+      expect(email.to).to include(@user_1.email)\n+      expect(email.subject).to eq(\"Welcome to Ocho Tickets!\")\n+      email.body.parts.each do |part|\n+        expect(part.to_s).to include(\n+          \"Welcome to Ocho Tickets, #{@user_1.full_name}!\")\n+        expect(part.to_s).to include(\n+          \"log in with your email address (#{@user_1.email}) and your password.\")","path":"spec/mailers/notifications_mailer_spec.rb","position":60,"original_position":60,"commit_id":"4e8c0abcd345604c0a331f066fe8850785e2676a","original_commit_id":"4e8c0abcd345604c0a331f066fe8850785e2676a","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":"Line is too long. [81/80]","created_at":"2015-09-02T19:38:14Z","updated_at":"2015-09-02T19:38:14Z","html_url":"https://github.com/imwithsam/the_pivot/pull/86#discussion_r38574636","pull_request_url":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/imwithsam/the_pivot/pulls/comments/38574636"},"html":{"href":"https://github.com/imwithsam/the_pivot/pull/86#discussion_r38574636"},"pull_request":{"href":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86","id":43949631,"html_url":"https://github.com/imwithsam/the_pivot/pull/86","diff_url":"https://github.com/imwithsam/the_pivot/pull/86.diff","patch_url":"https://github.com/imwithsam/the_pivot/pull/86.patch","issue_url":"https://api.github.com/repos/imwithsam/the_pivot/issues/86","number":86,"state":"open","locked":false,"title":"WIP: Refactor customer order email confirmation and add tests","user":{"login":"imwithsam","id":1934074,"avatar_url":"https://avatars.githubusercontent.com/u/1934074?v=3","gravatar_id":"","url":"https://api.github.com/users/imwithsam","html_url":"https://github.com/imwithsam","followers_url":"https://api.github.com/users/imwithsam/followers","following_url":"https://api.github.com/users/imwithsam/following{/other_user}","gists_url":"https://api.github.com/users/imwithsam/gists{/gist_id}","starred_url":"https://api.github.com/users/imwithsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imwithsam/subscriptions","organizations_url":"https://api.github.com/users/imwithsam/orgs","repos_url":"https://api.github.com/users/imwithsam/repos","events_url":"https://api.github.com/users/imwithsam/events{/privacy}","received_events_url":"https://api.github.com/users/imwithsam/received_events","type":"User","site_admin":false},"body":"Do not merge this to master yet. I still need to refactor the other email calls and add tests. You can use this branch as a reference if you want to work on the last remaining email waffle.","created_at":"2015-09-02T03:05:42Z","updated_at":"2015-09-02T19:38:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2f48abd0399b852a3ae28241ea1515b1ee68322","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86/commits","review_comments_url":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86/comments","review_comment_url":"https://api.github.com/repos/imwithsam/the_pivot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/imwithsam/the_pivot/issues/86/comments","statuses_url":"https://api.github.com/repos/imwithsam/the_pivot/statuses/4e8c0abcd345604c0a331f066fe8850785e2676a","head":{"label":"imwithsam:69-user_purchase_email","ref":"69-user_purchase_email","sha":"4e8c0abcd345604c0a331f066fe8850785e2676a","user":{"login":"imwithsam","id":1934074,"avatar_url":"https://avatars.githubusercontent.com/u/1934074?v=3","gravatar_id":"","url":"https://api.github.com/users/imwithsam","html_url":"https://github.com/imwithsam","followers_url":"https://api.github.com/users/imwithsam/followers","following_url":"https://api.github.com/users/imwithsam/following{/other_user}","gists_url":"https://api.github.com/users/imwithsam/gists{/gist_id}","starred_url":"https://api.github.com/users/imwithsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imwithsam/subscriptions","organizations_url":"https://api.github.com/users/imwithsam/orgs","repos_url":"https://api.github.com/users/imwithsam/repos","events_url":"https://api.github.com/users/imwithsam/events{/privacy}","received_events_url":"https://api.github.com/users/imwithsam/received_events","type":"User","site_admin":false},"repo":{"id":41322219,"name":"the_pivot","full_name":"imwithsam/the_pivot","owner":{"login":"imwithsam","id":1934074,"avatar_url":"https://avatars.githubusercontent.com/u/1934074?v=3","gravatar_id":"","url":"https://api.github.com/users/imwithsam","html_url":"https://github.com/imwithsam","followers_url":"https://api.github.com/users/imwithsam/followers","following_url":"https://api.github.com/users/imwithsam/following{/other_user}","gists_url":"https://api.github.com/users/imwithsam/gists{/gist_id}","starred_url":"https://api.github.com/users/imwithsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imwithsam/subscriptions","organizations_url":"https://api.github.com/users/imwithsam/orgs","repos_url":"https://api.github.com/users/imwithsam/repos","events_url":"https://api.github.com/users/imwithsam/events{/privacy}","received_events_url":"https://api.github.com/users/imwithsam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/imwithsam/the_pivot","description":"Pivoting a brownfield project with Ruby on Rails and JavaScript","fork":false,"url":"https://api.github.com/repos/imwithsam/the_pivot","forks_url":"https://api.github.com/repos/imwithsam/the_pivot/forks","keys_url":"https://api.github.com/repos/imwithsam/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imwithsam/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imwithsam/the_pivot/teams","hooks_url":"https://api.github.com/repos/imwithsam/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/imwithsam/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/imwithsam/the_pivot/events","assignees_url":"https://api.github.com/repos/imwithsam/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/imwithsam/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/imwithsam/the_pivot/tags","blobs_url":"https://api.github.com/repos/imwithsam/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imwithsam/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imwithsam/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/imwithsam/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imwithsam/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/imwithsam/the_pivot/languages","stargazers_url":"https://api.github.com/repos/imwithsam/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/imwithsam/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/imwithsam/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/imwithsam/the_pivot/subscription","commits_url":"https://api.github.com/repos/imwithsam/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/imwithsam/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/imwithsam/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/imwithsam/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/imwithsam/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/imwithsam/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imwithsam/the_pivot/merges","archive_url":"https://api.github.com/repos/imwithsam/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imwithsam/the_pivot/downloads","issues_url":"https://api.github.com/repos/imwithsam/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/imwithsam/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/imwithsam/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/imwithsam/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imwithsam/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/imwithsam/the_pivot/releases{/id}","created_at":"2015-08-24T19:16:33Z","updated_at":"2015-08-24T19:17:13Z","pushed_at":"2015-09-02T19:38:12Z","git_url":"git://github.com/imwithsam/the_pivot.git","ssh_url":"git@github.com:imwithsam/the_pivot.git","clone_url":"https://github.com/imwithsam/the_pivot.git","svn_url":"https://github.com/imwithsam/the_pivot","homepage":null,"size":7624,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"imwithsam:master","ref":"master","sha":"3cab3abe09677804c7a5134aea577f43a1f4fb26","user":{"login":"imwithsam","id":1934074,"avatar_url":"https://avatars.githubusercontent.com/u/1934074?v=3","gravatar_id":"","url":"https://api.github.com/users/imwithsam","html_url":"https://github.com/imwithsam","followers_url":"https://api.github.com/users/imwithsam/followers","following_url":"https://api.github.com/users/imwithsam/following{/other_user}","gists_url":"https://api.github.com/users/imwithsam/gists{/gist_id}","starred_url":"https://api.github.com/users/imwithsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imwithsam/subscriptions","organizations_url":"https://api.github.com/users/imwithsam/orgs","repos_url":"https://api.github.com/users/imwithsam/repos","events_url":"https://api.github.com/users/imwithsam/events{/privacy}","received_events_url":"https://api.github.com/users/imwithsam/received_events","type":"User","site_admin":false},"repo":{"id":41322219,"name":"the_pivot","full_name":"imwithsam/the_pivot","owner":{"login":"imwithsam","id":1934074,"avatar_url":"https://avatars.githubusercontent.com/u/1934074?v=3","gravatar_id":"","url":"https://api.github.com/users/imwithsam","html_url":"https://github.com/imwithsam","followers_url":"https://api.github.com/users/imwithsam/followers","following_url":"https://api.github.com/users/imwithsam/following{/other_user}","gists_url":"https://api.github.com/users/imwithsam/gists{/gist_id}","starred_url":"https://api.github.com/users/imwithsam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imwithsam/subscriptions","organizations_url":"https://api.github.com/users/imwithsam/orgs","repos_url":"https://api.github.com/users/imwithsam/repos","events_url":"https://api.github.com/users/imwithsam/events{/privacy}","received_events_url":"https://api.github.com/users/imwithsam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/imwithsam/the_pivot","description":"Pivoting a brownfield project with Ruby on Rails and JavaScript","fork":false,"url":"https://api.github.com/repos/imwithsam/the_pivot","forks_url":"https://api.github.com/repos/imwithsam/the_pivot/forks","keys_url":"https://api.github.com/repos/imwithsam/the_pivot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imwithsam/the_pivot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imwithsam/the_pivot/teams","hooks_url":"https://api.github.com/repos/imwithsam/the_pivot/hooks","issue_events_url":"https://api.github.com/repos/imwithsam/the_pivot/issues/events{/number}","events_url":"https://api.github.com/repos/imwithsam/the_pivot/events","assignees_url":"https://api.github.com/repos/imwithsam/the_pivot/assignees{/user}","branches_url":"https://api.github.com/repos/imwithsam/the_pivot/branches{/branch}","tags_url":"https://api.github.com/repos/imwithsam/the_pivot/tags","blobs_url":"https://api.github.com/repos/imwithsam/the_pivot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imwithsam/the_pivot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imwithsam/the_pivot/git/refs{/sha}","trees_url":"https://api.github.com/repos/imwithsam/the_pivot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imwithsam/the_pivot/statuses/{sha}","languages_url":"https://api.github.com/repos/imwithsam/the_pivot/languages","stargazers_url":"https://api.github.com/repos/imwithsam/the_pivot/stargazers","contributors_url":"https://api.github.com/repos/imwithsam/the_pivot/contributors","subscribers_url":"https://api.github.com/repos/imwithsam/the_pivot/subscribers","subscription_url":"https://api.github.com/repos/imwithsam/the_pivot/subscription","commits_url":"https://api.github.com/repos/imwithsam/the_pivot/commits{/sha}","git_commits_url":"https://api.github.com/repos/imwithsam/the_pivot/git/commits{/sha}","comments_url":"https://api.github.com/repos/imwithsam/the_pivot/comments{/number}","issue_comment_url":"https://api.github.com/repos/imwithsam/the_pivot/issues/comments{/number}","contents_url":"https://api.github.com/repos/imwithsam/the_pivot/contents/{+path}","compare_url":"https://api.github.com/repos/imwithsam/the_pivot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imwithsam/the_pivot/merges","archive_url":"https://api.github.com/repos/imwithsam/the_pivot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imwithsam/the_pivot/downloads","issues_url":"https://api.github.com/repos/imwithsam/the_pivot/issues{/number}","pulls_url":"https://api.github.com/repos/imwithsam/the_pivot/pulls{/number}","milestones_url":"https://api.github.com/repos/imwithsam/the_pivot/milestones{/number}","notifications_url":"https://api.github.com/repos/imwithsam/the_pivot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imwithsam/the_pivot/labels{/name}","releases_url":"https://api.github.com/repos/imwithsam/the_pivot/releases{/id}","created_at":"2015-08-24T19:16:33Z","updated_at":"2015-08-24T19:17:13Z","pushed_at":"2015-09-02T19:38:12Z","git_url":"git://github.com/imwithsam/the_pivot.git","ssh_url":"git@github.com:imwithsam/the_pivot.git","clone_url":"https://github.com/imwithsam/the_pivot.git","svn_url":"https://github.com/imwithsam/the_pivot","homepage":null,"size":7624,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":8,"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86"},"html":{"href":"https://github.com/imwithsam/the_pivot/pull/86"},"issue":{"href":"https://api.github.com/repos/imwithsam/the_pivot/issues/86"},"comments":{"href":"https://api.github.com/repos/imwithsam/the_pivot/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/imwithsam/the_pivot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/imwithsam/the_pivot/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/imwithsam/the_pivot/statuses/4e8c0abcd345604c0a331f066fe8850785e2676a"}}}}