diff options
author | James Lopez <james@jameslopez.es> | 2018-02-13 11:24:14 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-02-13 15:25:49 +0100 |
commit | de83f29a3506af01af31c6668640fbb2a0dd54a9 (patch) | |
tree | 3fb2a0bf435fcaa8dec4f0117fc3abe0535009a3 /spec/requests | |
parent | 79879145e5cfb3837b3a2f77fb7c35bd1234068c (diff) | |
download | gitlab-ce-de83f29a3506af01af31c6668640fbb2a0dd54a9.tar.gz |
add more specs
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/project_import_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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) |