diff options
Diffstat (limited to 'spec/requests/api/project_import_spec.rb')
-rw-r--r-- | spec/requests/api/project_import_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb index 7e6d80c047c..8655e5b0238 100644 --- a/spec/requests/api/project_import_spec.rb +++ b/spec/requests/api/project_import_spec.rb @@ -462,6 +462,16 @@ RSpec.describe API::ProjectImport, :aggregate_failures do expect(json_response).to include('import_status' => 'failed', 'import_error' => 'error') end + + it 'returns the import status if canceled' do + project = create(:project, :import_canceled) + project.add_maintainer(user) + + get api("/projects/#{project.id}/import", user) + + expect(response).to have_gitlab_http_status(:ok) + expect(json_response).to include('import_status' => 'canceled') + end end describe 'POST /projects/import/authorize' do |