Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2018-02-12 17:26:59 +0300
committerJames Lopez <james@jameslopez.es>2018-02-13 17:25:48 +0300
commit516d33f5ac8f65d8d69d1e5e88efbf0faabbe0eb (patch)
treeeca0fac8e5ddb91236b3e0f27343c6e4371a2608 /spec/requests/api/project_import_spec.rb
parentd3b3f5d1b4def5e87f90a2347acc0b0ee8edc80a (diff)
update import API and spec
Diffstat (limited to 'spec/requests/api/project_import_spec.rb')
-rw-r--r--spec/requests/api/project_import_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb
index b810c81108c..0875c1cc149 100644
--- a/spec/requests/api/project_import_spec.rb
+++ b/spec/requests/api/project_import_spec.rb
@@ -8,7 +8,7 @@ describe API::ProjectImport do
before do
allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path)
- group.add_owner(user)
+ namespace.add_owner(user)
end
after do
@@ -19,9 +19,11 @@ describe API::ProjectImport do
it 'schedules an import' do
expect_any_instance_of(Project).to receive(:import_schedule)
- post api('/projects/import', user), name: 'test', file: file, namespace: namespace.full_path
+ post api('/projects/import', user), path: 'test-import', file: file, namespace: namespace.full_path
- expect(project.status).to eq('started')
+ expect(response).to have_gitlab_http_status(200)
+
+ expect(Project.find_by_name('test-import').first.status).to eq('started')
end
end