From de83f29a3506af01af31c6668640fbb2a0dd54a9 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Tue, 13 Feb 2018 11:24:14 +0100 Subject: add more specs --- spec/requests/api/project_import_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/requests') diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb index b7b22e91bbf..47c1edc7919 100644 --- a/spec/requests/api/project_import_spec.rb +++ b/spec/requests/api/project_import_spec.rb @@ -20,6 +20,15 @@ describe API::ProjectImport do expect_any_instance_of(Project).to receive(:import_schedule) expect(Gitlab::ImportExport::ProjectCreator).to receive(:new).with(namespace.id, any_args).and_call_original + post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.id + + expect(response).to have_gitlab_http_status(201) + end + + it 'schedules an import using the namespace path' do + expect_any_instance_of(Project).to receive(:import_schedule) + expect(Gitlab::ImportExport::ProjectCreator).to receive(:new).with(namespace.id, any_args).and_call_original + post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path expect(response).to have_gitlab_http_status(201) -- cgit v1.2.1