Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-05 15:09:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-05 15:09:59 +0300
commitb90cf01a88df981f452a7f6b6d74e8fd0ccbf90b (patch)
tree669bd8c7dab7f6aad2b9eef6d03cdb7bb4e687db /spec/workers
parentf9053931de583bbc3c6a8033f70929a91ce02e93 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/personal_access_tokens/expired_notification_worker_spec.rb4
-rw-r--r--spec/workers/projects/delete_branch_worker_spec.rb18
2 files changed, 2 insertions, 20 deletions
diff --git a/spec/workers/personal_access_tokens/expired_notification_worker_spec.rb b/spec/workers/personal_access_tokens/expired_notification_worker_spec.rb
index 3ff67f47523..7c3c48b3f80 100644
--- a/spec/workers/personal_access_tokens/expired_notification_worker_spec.rb
+++ b/spec/workers/personal_access_tokens/expired_notification_worker_spec.rb
@@ -11,7 +11,7 @@ RSpec.describe PersonalAccessTokens::ExpiredNotificationWorker, type: :worker do
it 'uses notification service to send email to the user' do
expect_next_instance_of(NotificationService) do |notification_service|
- expect(notification_service).to receive(:access_token_expired).with(expired_today.user)
+ expect(notification_service).to receive(:access_token_expired).with(expired_today.user, [expired_today.name])
end
worker.perform
@@ -25,7 +25,7 @@ RSpec.describe PersonalAccessTokens::ExpiredNotificationWorker, type: :worker do
shared_examples 'expiry notification is not required to be sent for the token' do
it do
expect_next_instance_of(NotificationService) do |notification_service|
- expect(notification_service).not_to receive(:access_token_expired).with(token.user)
+ expect(notification_service).not_to receive(:access_token_expired).with(token.user, [token.name])
end
worker.perform
diff --git a/spec/workers/projects/delete_branch_worker_spec.rb b/spec/workers/projects/delete_branch_worker_spec.rb
index c1289f56929..ec3feecccdc 100644
--- a/spec/workers/projects/delete_branch_worker_spec.rb
+++ b/spec/workers/projects/delete_branch_worker_spec.rb
@@ -83,24 +83,6 @@ RSpec.describe Projects::DeleteBranchWorker, feature_category: :source_code_mana
expect { worker.perform(project.id, user.id, branch) }.not_to raise_error
end
end
-
- context 'when track_and_raise_delete_source_errors is disabled' do
- let(:status_code) { 400 }
-
- before do
- stub_feature_flags(track_and_raise_delete_source_errors: false)
- end
-
- it 'does not track the exception' do
- expect_next_instance_of(::Branches::DeleteService) do |instance|
- expect(instance).to receive(:execute).with(branch).and_return(service_result)
- end
-
- expect(service_result).not_to receive(:track_and_raise_exception)
-
- expect { worker.perform(project.id, user.id, branch) }.not_to raise_error
- end
- end
end
end