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:
Diffstat (limited to 'spec/services/post_receive_service_spec.rb')
-rw-r--r--spec/services/post_receive_service_spec.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/spec/services/post_receive_service_spec.rb b/spec/services/post_receive_service_spec.rb
index 6e2cd7edf04..033194972c7 100644
--- a/spec/services/post_receive_service_spec.rb
+++ b/spec/services/post_receive_service_spec.rb
@@ -4,7 +4,6 @@ require 'spec_helper'
RSpec.describe PostReceiveService do
include Gitlab::Routing
- include AfterNextHelpers
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :repository, :wiki_repo, namespace: user.namespace) }
@@ -47,11 +46,7 @@ RSpec.describe PostReceiveService do
expect(subject).to be_empty
end
- it 'does not record an onboarding progress action' do
- expect_next(OnboardingProgressService).not_to receive(:execute)
-
- subject
- end
+ it_behaves_like 'does not record an onboarding progress action'
end
context 'when repository is nil' do
@@ -88,11 +83,8 @@ RSpec.describe PostReceiveService do
expect(response.reference_counter_decreased).to be(true)
end
- it 'records an onboarding progress action' do
- expect_next(OnboardingProgressService, project.namespace)
- .to receive(:execute).with(action: :git_write)
-
- subject
+ it_behaves_like 'records an onboarding progress action', :git_write do
+ let(:namespace) { project.namespace }
end
end