summaryrefslogtreecommitdiff
path: root/spec/workers/namespaces/invite_team_email_worker_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/workers/namespaces/invite_team_email_worker_spec.rb')
-rw-r--r--spec/workers/namespaces/invite_team_email_worker_spec.rb27
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/workers/namespaces/invite_team_email_worker_spec.rb b/spec/workers/namespaces/invite_team_email_worker_spec.rb
deleted file mode 100644
index 47fdff9a8ef..00000000000
--- a/spec/workers/namespaces/invite_team_email_worker_spec.rb
+++ /dev/null
@@ -1,27 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe Namespaces::InviteTeamEmailWorker do
- let_it_be(:user) { create(:user) }
- let_it_be(:group) { create(:group) }
-
- it 'sends the email' do
- expect(Namespaces::InviteTeamEmailService).to receive(:send_email).with(user, group).once
- subject.perform(group.id, user.id)
- end
-
- context 'when user id is non-existent' do
- it 'does not send the email' do
- expect(Namespaces::InviteTeamEmailService).not_to receive(:send_email)
- subject.perform(group.id, non_existing_record_id)
- end
- end
-
- context 'when group id is non-existent' do
- it 'does not send the email' do
- expect(Namespaces::InviteTeamEmailService).not_to receive(:send_email)
- subject.perform(non_existing_record_id, user.id)
- end
- end
-end