From 2dc2bad6233e1e74c74c49af4be838e0a39dcd53 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 14 Feb 2018 14:55:11 +0100 Subject: [PATCH] refactor code based on feedback --- doc/api/project_import_export.md | 2 +- spec/requests/api/project_import_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/project_import_export.md b/doc/api/project_import_export.md index 17b9b530be7..c473b94aafe 100644 --- a/doc/api/project_import_export.md +++ b/doc/api/project_import_export.md @@ -22,7 +22,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded by `@`. For example: ```console -curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" -F "path=api-project" -F "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import +curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" --form "path=api-project" --form "file=@/path/to/file" https://gitlab.example.com/api/v4/projects/import ``` ```json diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb index 2fb103c6510..eabf9095c13 100644 --- a/spec/requests/api/project_import_spec.rb +++ b/spec/requests/api/project_import_spec.rb @@ -17,7 +17,7 @@ describe API::ProjectImport do describe 'POST /projects/import' do it 'schedules an import using a namespace' do - stub_import(user.namespace) + stub_import(namespace) post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.id @@ -25,7 +25,7 @@ describe API::ProjectImport do end it 'schedules an import using the namespace path' do - stub_import(unamespace) + stub_import(namespace) post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path