add more specs

This commit is contained in:
James Lopez 2018-02-13 11:24:14 +01:00
parent 79879145e5
commit de83f29a35
No known key found for this signature in database
GPG Key ID: 756BF8E9D7C0CF39
1 changed files with 9 additions and 0 deletions

View File

@ -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)