Skip to content
Snippets Groups Projects
Unverified Commit 848f4980 authored by James Lopez's avatar James Lopez
Browse files

add entity and update spec

parent de3edb71
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -138,6 +138,7 @@ module API
mount ::API::PagesDomains
mount ::API::Pipelines
mount ::API::PipelineSchedules
mount ::API::ProjectImport
mount ::API::ProjectHooks
mount ::API::Projects
mount ::API::ProjectMilestones
Loading
Loading
Loading
Loading
@@ -90,6 +90,11 @@ module API
expose :created_at
end
 
class ProjectImportStatus < ProjectIdentity
expose :import_status
expose :import_error, if: :import_error
end
class BasicProjectDetails < ProjectIdentity
include ::API::ProjectsRelationBuilder
 
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ describe API::ProjectImport do
get api("/projects/#{project.id}/import", user)
 
expect(response).to have_gitlab_http_status(200)
expect(json_response).to eq('import_status' => 'started')
expect(json_response).to include('import_status' => 'started')
end
 
it 'returns the import status and the error if failed' do
Loading
Loading
@@ -42,7 +42,7 @@ describe API::ProjectImport do
get api("/projects/#{project.id}/import", user)
 
expect(response).to have_gitlab_http_status(200)
expect(json_response).to eq('import_status' => 'failed',
expect(json_response).to include('import_status' => 'failed',
'import_error' => 'error')
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment