{"action":"created","comment":{"url":"https://api.github.com/repos/alfagen/aml-engine/pulls/comments/243788851","pull_request_review_id":187647915,"id":243788851,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0Mzc4ODg1MQ==","diff_hunk":"@@ -0,0 +1,29 @@\n+require 'spec_helper'\n+\n+RSpec.describe AML::NotificationMailer do\n+  let(:pending_notification) { create :aml_notification, key: 'on_pending_notification' }\n+  let(:aml_status) { create :aml_status, :default, on_pending_notification: pending_notification }\n+  let(:aml_client) {\n+    create :aml_client,\n+    aml_status: aml_status,\n+    risk_category: AML::Client.risk_category.values.first\n+  }\n+  let(:aml_order) { create :aml_order, aml_status: aml_status, client: aml_client }\n+  let!(:aml_order_document) { create :aml_order_document, :loaded, order: aml_order }\n+\n+  describe 'загруженные документы' do\n+    context do\n+      it 'если нет template_id то done! не отправляет уведомление по order' do\n+        expect{aml_order.done!}.to_not change{ActionMailer::Base.deliveries.count}\n+      end\n+\n+      it 'если есть template_id то done! отправляет уведомление по order' do\n+        template = pending_notification.aml_notification_templates\n+        expect(template).to receive(:update).with(template_id: 'template_id').and_call_original","path":"spec/mailers/aml/notification_mailer_spec.rb","position":22,"original_position":22,"commit_id":"eb9c8ada73017e7ef8f1a709468fd0b69d65b051","original_commit_id":"eb9c8ada73017e7ef8f1a709468fd0b69d65b051","user":{"login":"dapi","id":31139,"node_id":"MDQ6VXNlcjMxMTM5","avatar_url":"https://avatars2.githubusercontent.com/u/31139?v=4","gravatar_id":"","url":"https://api.github.com/users/dapi","html_url":"https://github.com/dapi","followers_url":"https://api.github.com/users/dapi/followers","following_url":"https://api.github.com/users/dapi/following{/other_user}","gists_url":"https://api.github.com/users/dapi/gists{/gist_id}","starred_url":"https://api.github.com/users/dapi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dapi/subscriptions","organizations_url":"https://api.github.com/users/dapi/orgs","repos_url":"https://api.github.com/users/dapi/repos","events_url":"https://api.github.com/users/dapi/events{/privacy}","received_events_url":"https://api.github.com/users/dapi/received_events","type":"User","site_admin":false},"body":"это какое отношение имеет к AML::NotificationMailer? А если мы решим по другому вызывать уведомления?","created_at":"2018-12-24T05:45:03Z","updated_at":"2018-12-24T05:45:03Z","html_url":"https://github.com/alfagen/aml-engine/pull/150#discussion_r243788851","pull_request_url":"https://api.github.com/repos/alfagen/aml-engine/pulls/150","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alfagen/aml-engine/pulls/comments/243788851"},"html":{"href":"https://github.com/alfagen/aml-engine/pull/150#discussion_r243788851"},"pull_request":{"href":"https://api.github.com/repos/alfagen/aml-engine/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/alfagen/aml-engine/pulls/150","id":240116813,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMTE2ODEz","html_url":"https://github.com/alfagen/aml-engine/pull/150","diff_url":"https://github.com/alfagen/aml-engine/pull/150.diff","patch_url":"https://github.com/alfagen/aml-engine/pull/150.patch","issue_url":"https://api.github.com/repos/alfagen/aml-engine/issues/150","number":150,"state":"open","locked":false,"title":"тест для уведомлений","user":{"login":"ValentinAndreev","id":19556071,"node_id":"MDQ6VXNlcjE5NTU2MDcx","avatar_url":"https://avatars2.githubusercontent.com/u/19556071?v=4","gravatar_id":"","url":"https://api.github.com/users/ValentinAndreev","html_url":"https://github.com/ValentinAndreev","followers_url":"https://api.github.com/users/ValentinAndreev/followers","following_url":"https://api.github.com/users/ValentinAndreev/following{/other_user}","gists_url":"https://api.github.com/users/ValentinAndreev/gists{/gist_id}","starred_url":"https://api.github.com/users/ValentinAndreev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ValentinAndreev/subscriptions","organizations_url":"https://api.github.com/users/ValentinAndreev/orgs","repos_url":"https://api.github.com/users/ValentinAndreev/repos","events_url":"https://api.github.com/users/ValentinAndreev/events{/privacy}","received_events_url":"https://api.github.com/users/ValentinAndreev/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-20T10:15:37Z","updated_at":"2018-12-24T05:45:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"04d12087071f18dafc35e5d67b4066bf521b9f57","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alfagen/aml-engine/pulls/150/commits","review_comments_url":"https://api.github.com/repos/alfagen/aml-engine/pulls/150/comments","review_comment_url":"https://api.github.com/repos/alfagen/aml-engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alfagen/aml-engine/issues/150/comments","statuses_url":"https://api.github.com/repos/alfagen/aml-engine/statuses/eb9c8ada73017e7ef8f1a709468fd0b69d65b051","head":{"label":"alfagen:fix/notifications-tests","ref":"fix/notifications-tests","sha":"eb9c8ada73017e7ef8f1a709468fd0b69d65b051","user":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"repo":{"id":146639556,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2Mzk1NTY=","name":"aml-engine","full_name":"alfagen/aml-engine","private":false,"owner":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alfagen/aml-engine","description":"AML Engine","fork":false,"url":"https://api.github.com/repos/alfagen/aml-engine","forks_url":"https://api.github.com/repos/alfagen/aml-engine/forks","keys_url":"https://api.github.com/repos/alfagen/aml-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfagen/aml-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfagen/aml-engine/teams","hooks_url":"https://api.github.com/repos/alfagen/aml-engine/hooks","issue_events_url":"https://api.github.com/repos/alfagen/aml-engine/issues/events{/number}","events_url":"https://api.github.com/repos/alfagen/aml-engine/events","assignees_url":"https://api.github.com/repos/alfagen/aml-engine/assignees{/user}","branches_url":"https://api.github.com/repos/alfagen/aml-engine/branches{/branch}","tags_url":"https://api.github.com/repos/alfagen/aml-engine/tags","blobs_url":"https://api.github.com/repos/alfagen/aml-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfagen/aml-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfagen/aml-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfagen/aml-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfagen/aml-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/alfagen/aml-engine/languages","stargazers_url":"https://api.github.com/repos/alfagen/aml-engine/stargazers","contributors_url":"https://api.github.com/repos/alfagen/aml-engine/contributors","subscribers_url":"https://api.github.com/repos/alfagen/aml-engine/subscribers","subscription_url":"https://api.github.com/repos/alfagen/aml-engine/subscription","commits_url":"https://api.github.com/repos/alfagen/aml-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfagen/aml-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfagen/aml-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfagen/aml-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfagen/aml-engine/contents/{+path}","compare_url":"https://api.github.com/repos/alfagen/aml-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfagen/aml-engine/merges","archive_url":"https://api.github.com/repos/alfagen/aml-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfagen/aml-engine/downloads","issues_url":"https://api.github.com/repos/alfagen/aml-engine/issues{/number}","pulls_url":"https://api.github.com/repos/alfagen/aml-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/alfagen/aml-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/alfagen/aml-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfagen/aml-engine/labels{/name}","releases_url":"https://api.github.com/repos/alfagen/aml-engine/releases{/id}","deployments_url":"https://api.github.com/repos/alfagen/aml-engine/deployments","created_at":"2018-08-29T18:07:54Z","updated_at":"2018-12-21T08:10:37Z","pushed_at":"2018-12-23T17:54:08Z","git_url":"git://github.com/alfagen/aml-engine.git","ssh_url":"git@github.com:alfagen/aml-engine.git","clone_url":"https://github.com/alfagen/aml-engine.git","svn_url":"https://github.com/alfagen/aml-engine","homepage":null,"size":617,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"alfagen:master","ref":"master","sha":"a0892b3552b3caf811c6705af319285cf2b4518a","user":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"repo":{"id":146639556,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2Mzk1NTY=","name":"aml-engine","full_name":"alfagen/aml-engine","private":false,"owner":{"login":"alfagen","id":36159568,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2MTU5NTY4","avatar_url":"https://avatars2.githubusercontent.com/u/36159568?v=4","gravatar_id":"","url":"https://api.github.com/users/alfagen","html_url":"https://github.com/alfagen","followers_url":"https://api.github.com/users/alfagen/followers","following_url":"https://api.github.com/users/alfagen/following{/other_user}","gists_url":"https://api.github.com/users/alfagen/gists{/gist_id}","starred_url":"https://api.github.com/users/alfagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfagen/subscriptions","organizations_url":"https://api.github.com/users/alfagen/orgs","repos_url":"https://api.github.com/users/alfagen/repos","events_url":"https://api.github.com/users/alfagen/events{/privacy}","received_events_url":"https://api.github.com/users/alfagen/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/alfagen/aml-engine","description":"AML Engine","fork":false,"url":"https://api.github.com/repos/alfagen/aml-engine","forks_url":"https://api.github.com/repos/alfagen/aml-engine/forks","keys_url":"https://api.github.com/repos/alfagen/aml-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alfagen/aml-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alfagen/aml-engine/teams","hooks_url":"https://api.github.com/repos/alfagen/aml-engine/hooks","issue_events_url":"https://api.github.com/repos/alfagen/aml-engine/issues/events{/number}","events_url":"https://api.github.com/repos/alfagen/aml-engine/events","assignees_url":"https://api.github.com/repos/alfagen/aml-engine/assignees{/user}","branches_url":"https://api.github.com/repos/alfagen/aml-engine/branches{/branch}","tags_url":"https://api.github.com/repos/alfagen/aml-engine/tags","blobs_url":"https://api.github.com/repos/alfagen/aml-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alfagen/aml-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alfagen/aml-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/alfagen/aml-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alfagen/aml-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/alfagen/aml-engine/languages","stargazers_url":"https://api.github.com/repos/alfagen/aml-engine/stargazers","contributors_url":"https://api.github.com/repos/alfagen/aml-engine/contributors","subscribers_url":"https://api.github.com/repos/alfagen/aml-engine/subscribers","subscription_url":"https://api.github.com/repos/alfagen/aml-engine/subscription","commits_url":"https://api.github.com/repos/alfagen/aml-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/alfagen/aml-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/alfagen/aml-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/alfagen/aml-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/alfagen/aml-engine/contents/{+path}","compare_url":"https://api.github.com/repos/alfagen/aml-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alfagen/aml-engine/merges","archive_url":"https://api.github.com/repos/alfagen/aml-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alfagen/aml-engine/downloads","issues_url":"https://api.github.com/repos/alfagen/aml-engine/issues{/number}","pulls_url":"https://api.github.com/repos/alfagen/aml-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/alfagen/aml-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/alfagen/aml-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alfagen/aml-engine/labels{/name}","releases_url":"https://api.github.com/repos/alfagen/aml-engine/releases{/id}","deployments_url":"https://api.github.com/repos/alfagen/aml-engine/deployments","created_at":"2018-08-29T18:07:54Z","updated_at":"2018-12-21T08:10:37Z","pushed_at":"2018-12-23T17:54:08Z","git_url":"git://github.com/alfagen/aml-engine.git","ssh_url":"git@github.com:alfagen/aml-engine.git","clone_url":"https://github.com/alfagen/aml-engine.git","svn_url":"https://github.com/alfagen/aml-engine","homepage":null,"size":617,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":null,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alfagen/aml-engine/pulls/150"},"html":{"href":"https://github.com/alfagen/aml-engine/pull/150"},"issue":{"href":"https://api.github.com/repos/alfagen/aml-engine/issues/150"},"comments":{"href":"https://api.github.com/repos/alfagen/aml-engine/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/alfagen/aml-engine/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/alfagen/aml-engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alfagen/aml-engine/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/alfagen/aml-engine/statuses/eb9c8ada73017e7ef8f1a709468fd0b69d65b051"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dapi"}}