diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-22 12:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-22 12:09:45 +0300 |
commit | b81fd57f3d62db4455108c8de4b8d7b8d403de35 (patch) | |
tree | d6750edadd7a35bb6719a28f8a56b4e4174a340a /spec/services | |
parent | d17c58402b28c7eabe74df21b57ae31beec56b1f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/lfs/push_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/post_receive_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/projects/create_service_spec.rb | 21 |
3 files changed, 3 insertions, 22 deletions
diff --git a/spec/services/lfs/push_service_spec.rb b/spec/services/lfs/push_service_spec.rb index f67284ff48d..58fb2f3fb9b 100644 --- a/spec/services/lfs/push_service_spec.rb +++ b/spec/services/lfs/push_service_spec.rb @@ -63,6 +63,7 @@ RSpec.describe Lfs::PushService do it 'returns a failure when submitting a batch fails' do expect(lfs_client).to receive(:batch!) { raise 'failed' } + expect(Gitlab::ErrorTracking).to receive(:log_exception).and_call_original expect(service.execute).to eq(status: :error, message: 'failed') end @@ -70,6 +71,7 @@ RSpec.describe Lfs::PushService do stub_lfs_batch(lfs_object) expect(lfs_client).to receive(:upload!) { raise 'failed' } + expect(Gitlab::ErrorTracking).to receive(:log_exception).and_call_original expect(service.execute).to eq(status: :error, message: 'failed') end diff --git a/spec/services/post_receive_service_spec.rb b/spec/services/post_receive_service_spec.rb index 033194972c7..2a78dc454c7 100644 --- a/spec/services/post_receive_service_spec.rb +++ b/spec/services/post_receive_service_spec.rb @@ -264,7 +264,7 @@ RSpec.describe PostReceiveService do context "project path matches" do before do - allow(project).to receive(:full_path).and_return("/company/sekrit-project") + allow(project).to receive(:full_path).and_return("company/sekrit-project") end it "does output the latest scoped broadcast message" do diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index e0d6b9afcff..36ae0571ad2 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -273,16 +273,6 @@ RSpec.describe Projects::CreateService, '#execute' do opts[:default_branch] = 'master' expect(create_project(user, opts)).to eq(nil) end - - it 'sets invalid service as inactive' do - create(:service, type: 'JiraService', project: nil, template: true, active: true) - - project = create_project(user, opts) - service = project.services.first - - expect(project).to be_persisted - expect(service.active).to be false - end end context 'wiki_enabled creates repository directory' do @@ -633,17 +623,6 @@ RSpec.describe Projects::CreateService, '#execute' do end end end - - context 'when there is an invalid integration' do - before do - create(:service, :template, type: 'DroneCiService', active: true) - end - - it 'creates an inactive service' do - expect(project).to be_persisted - expect(project.services.first.active).to be false - end - end end context 'when skip_disk_validation is used' do |