refactor code based on feedback
This commit is contained in:
parent
e613d777b2
commit
2dc2bad623
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ The `file=` parameter must point to a file on your filesystem and be preceded
|
||||||
by `@`. For example:
|
by `@`. For example:
|
||||||
|
|
||||||
```console
|
```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
|
```json
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe API::ProjectImport do
|
||||||
|
|
||||||
describe 'POST /projects/import' do
|
describe 'POST /projects/import' do
|
||||||
it 'schedules an import using a namespace' 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
|
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
|
end
|
||||||
|
|
||||||
it 'schedules an import using the namespace path' do
|
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
|
post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue