diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-12 15:09:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-12 15:09:15 +0300 |
commit | d7fd035dc387e9c2e5c31bbb53d867239689cfbf (patch) | |
tree | cfa2a19998e4743be51c987f200495d80a4c4466 /spec/workers/projects | |
parent | ede2fbdc8734f095d371614d362b5ae373d6a243 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/projects')
-rw-r--r-- | spec/workers/projects/post_creation_worker_spec.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/spec/workers/projects/post_creation_worker_spec.rb b/spec/workers/projects/post_creation_worker_spec.rb index 06e824f1530..b15b7b76b56 100644 --- a/spec/workers/projects/post_creation_worker_spec.rb +++ b/spec/workers/projects/post_creation_worker_spec.rb @@ -64,10 +64,7 @@ RSpec.describe Projects::PostCreationWorker do it 'cleans invalid record and logs warning', :aggregate_failures do invalid_service_record = build(:prometheus_service, properties: { api_url: nil, manual_configuration: true }.to_json) - - allow_next_found_instance_of(Project) do |instance| - allow(instance).to receive(:build_prometheus_service).and_return(invalid_service_record) - end + allow(PrometheusService).to receive(:new).and_return(invalid_service_record) expect(Gitlab::ErrorTracking).to receive(:track_exception).with(an_instance_of(ActiveRecord::RecordInvalid), include(extra: { project_id: a_kind_of(Integer) })).twice subject |