diff options
author | Diego Silva <diego.silva@live.com> | 2019-05-04 12:11:06 +0300 |
---|---|---|
committer | Diego Silva <diego.silva@live.com> | 2019-05-09 18:54:20 +0300 |
commit | 091b15b7421374df4e06bfdb91bef6a0c36072cf (patch) | |
tree | 9326d025e1a1e356f28847f698fcd9751f986364 /spec/services | |
parent | 389de5e1e49f19ecdcad72992cfe8884b9fc7e60 (diff) |
Change DetectRepositoryLanguagesWorker to not receive user
Fixes #60425
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/detect_repository_languages_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/projects/repository_languages_service_spec.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/projects/detect_repository_languages_service_spec.rb b/spec/services/projects/detect_repository_languages_service_spec.rb index e3e561c971c..df5eed18ac0 100644 --- a/spec/services/projects/detect_repository_languages_service_spec.rb +++ b/spec/services/projects/detect_repository_languages_service_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' describe Projects::DetectRepositoryLanguagesService, :clean_gitlab_redis_shared_state do set(:project) { create(:project, :repository) } - subject { described_class.new(project, project.owner) } + subject { described_class.new(project) } describe '#execute' do context 'without previous detection' do diff --git a/spec/services/projects/repository_languages_service_spec.rb b/spec/services/projects/repository_languages_service_spec.rb index 09c61363ad2..46c5095327d 100644 --- a/spec/services/projects/repository_languages_service_spec.rb +++ b/spec/services/projects/repository_languages_service_spec.rb @@ -10,7 +10,7 @@ describe Projects::RepositoryLanguagesService do context 'when a project is without detected programming languages' do it 'schedules a worker and returns the empty result' do - expect(::DetectRepositoryLanguagesWorker).to receive(:perform_async).with(project.id, project.owner.id) + expect(::DetectRepositoryLanguagesWorker).to receive(:perform_async).with(project.id) expect(service.execute).to eq([]) end end @@ -19,7 +19,7 @@ describe Projects::RepositoryLanguagesService do let!(:repository_language) { create(:repository_language, project: project) } it 'does not schedule a worker and returns the detected languages' do - expect(::DetectRepositoryLanguagesWorker).not_to receive(:perform_async).with(project.id, project.owner.id) + expect(::DetectRepositoryLanguagesWorker).not_to receive(:perform_async).with(project.id) languages = service.execute |