From 0f369d145b568fc1e1b6034b42a4b3a6b3652d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Mon, 1 Apr 2019 19:16:48 +0200 Subject: [PATCH] [CE] Reduce diff with EE in spec/models/project_spec.rb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- spec/models/project_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 2158d3cf3e6..33e514cd7b9 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -2143,6 +2143,15 @@ describe Project do expect(project.add_import_job).to eq(import_jid) end + + context 'without repository' do + it 'schedules RepositoryImportWorker' do + project = create(:project, import_url: generate(:url)) + + expect(RepositoryImportWorker).to receive(:perform_async).with(project.id).and_return(import_jid) + expect(project.add_import_job).to eq(import_jid) + end + end end context 'not forked' do