diff --git a/ee/spec/services/projects/create_service_spec.rb b/ee/spec/services/projects/create_service_spec.rb index 951921679d51a27cb92f8fc5969eb879f2888a57..c556b6965df56b747034f765c6d61ebdb9b3fd93 100644 --- a/ee/spec/services/projects/create_service_spec.rb +++ b/ee/spec/services/projects/create_service_spec.rb @@ -162,9 +162,12 @@ context 'when licensed' do before do stub_licensed_features(repository_mirrors: true) + stub_ee_application_setting(elasticsearch_indexing?: true) end it 'sets the correct attributes' do + expect(::Elastic::ProcessBookkeepingService).to receive(:track!).with(an_instance_of(User)) + expect(::Elastic::ProcessBookkeepingService).to receive(:track!).with(an_instance_of(Project)) expect(created_project).to be_persisted expect(created_project.mirror).to be true expect(created_project.mirror_user_id).to eq(user.id) diff --git a/ee/spec/services/projects/update_service_spec.rb b/ee/spec/services/projects/update_service_spec.rb index a0d49817ab9e2c905b63d40e4ed99badfff55c17..b487059de2fa025730996ab8a95e4730a2142133 100644 --- a/ee/spec/services/projects/update_service_spec.rb +++ b/ee/spec/services/projects/update_service_spec.rb @@ -83,9 +83,11 @@ before do stub_licensed_features(repository_mirrors: true) + stub_ee_application_setting(elasticsearch_indexing?: true) end it 'sets mirror attributes' do + expect(::Elastic::ProcessBookkeepingService).to receive(:track!).with(project).once result = update_project(project, user, opts) expect(result).to eq(status: :success)