diff options
Diffstat (limited to 'spec/services/git')
-rw-r--r-- | spec/services/git/base_hooks_service_spec.rb | 3 | ||||
-rw-r--r-- | spec/services/git/process_ref_changes_service_spec.rb | 14 | ||||
-rw-r--r-- | spec/services/git/wiki_push_service_spec.rb | 2 |
3 files changed, 6 insertions, 13 deletions
diff --git a/spec/services/git/base_hooks_service_spec.rb b/spec/services/git/base_hooks_service_spec.rb index 661c77b56bb..4ab27c7ab05 100644 --- a/spec/services/git/base_hooks_service_spec.rb +++ b/spec/services/git/base_hooks_service_spec.rb @@ -171,6 +171,7 @@ RSpec.describe Git::BaseHooksService do } } end + let(:variables_attributes) { [] } before do @@ -192,6 +193,7 @@ RSpec.describe Git::BaseHooksService do } } end + let(:variables_attributes) do [ { "key" => "FOO", "variable_type" => "env_var", "secret_value" => "123" }, @@ -219,6 +221,7 @@ RSpec.describe Git::BaseHooksService do } } end + let(:variables_attributes) do [ { "key" => "FOO", "variable_type" => "env_var", "secret_value" => "123" } diff --git a/spec/services/git/process_ref_changes_service_spec.rb b/spec/services/git/process_ref_changes_service_spec.rb index c2fb40a0ed0..fc313bf6eb9 100644 --- a/spec/services/git/process_ref_changes_service_spec.rb +++ b/spec/services/git/process_ref_changes_service_spec.rb @@ -167,6 +167,7 @@ RSpec.describe Git::ProcessRefChangesService do { index: 0, oldrev: Gitlab::Git::BLANK_SHA, newrev: '789012', ref: "refs/tags/v10.0.0" } ] end + let(:branch_changes) do [ { index: 0, oldrev: Gitlab::Git::BLANK_SHA, newrev: '789012', ref: "#{ref_prefix}/create1" }, @@ -174,6 +175,7 @@ RSpec.describe Git::ProcessRefChangesService do { index: 2, oldrev: Gitlab::Git::BLANK_SHA, newrev: '789014', ref: "#{ref_prefix}/create3" } ] end + let(:git_changes) { double(branch_changes: branch_changes, tag_changes: tag_changes) } it 'schedules job for existing merge requests' do @@ -190,18 +192,6 @@ RSpec.describe Git::ProcessRefChangesService do subject.execute end - - context 'refresh_only_existing_merge_requests_on_push disabled' do - before do - stub_feature_flags(refresh_only_existing_merge_requests_on_push: false) - end - - it 'refreshes all merge requests' do - expect(UpdateMergeRequestsWorker).to receive(:perform_async).exactly(3).times - - subject.execute - end - end end end diff --git a/spec/services/git/wiki_push_service_spec.rb b/spec/services/git/wiki_push_service_spec.rb index f338b7a5709..7f709be8593 100644 --- a/spec/services/git/wiki_push_service_spec.rb +++ b/spec/services/git/wiki_push_service_spec.rb @@ -218,7 +218,7 @@ RSpec.describe Git::WikiPushService, services: true do message = 'something went very very wrong' allow_next_instance_of(WikiPages::EventCreateService, current_user) do |service| allow(service).to receive(:execute) - .with(String, WikiPage, Symbol) + .with(String, WikiPage, Symbol, String) .and_return(ServiceResponse.error(message: message)) end |