diff options
author | Sean McGivern <sean@gitlab.com> | 2018-07-04 18:12:37 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-07-04 18:12:37 +0300 |
commit | 37a6be36e26e021f9761f4c4c73f34bdf4238809 (patch) | |
tree | 32d5e319e347e89cd2a82d1d7e2e09d1748ada35 /spec/services/notification_recipient_service_spec.rb | |
parent | b9b0fc8db1fda57998a15cde076db1e38a3a5d4d (diff) |
Remove Gitaly N+1 ignore from NotificationRecipientService spec
This was because we were creating projects unnecessarily. These should be set as
the `source` for the notification setting, not the `project`!
Diffstat (limited to 'spec/services/notification_recipient_service_spec.rb')
-rw-r--r-- | spec/services/notification_recipient_service_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/services/notification_recipient_service_spec.rb b/spec/services/notification_recipient_service_spec.rb index 7f536ce4e68..14ba6b7bed2 100644 --- a/spec/services/notification_recipient_service_spec.rb +++ b/spec/services/notification_recipient_service_spec.rb @@ -12,15 +12,15 @@ describe NotificationRecipientService do def create_watcher watcher = create(:user) - create(:notification_setting, project: project, user: watcher, level: :watch) + create(:notification_setting, source: project, user: watcher, level: :watch) other_projects.each do |other_project| - create(:notification_setting, project: other_project, user: watcher, level: :watch) + create(:notification_setting, source: other_project, user: watcher, level: :watch) end end it 'avoids N+1 queries', :request_store do - Gitlab::GitalyClient.allow_n_plus_1_calls { create_watcher } + create_watcher service.build_new_note_recipients(note) @@ -28,7 +28,7 @@ describe NotificationRecipientService do service.build_new_note_recipients(note) end - Gitlab::GitalyClient.allow_n_plus_1_calls { create_watcher } + create_watcher expect { service.build_new_note_recipients(note) }.not_to exceed_query_limit(control_count) end |