add entity and update spec
This commit is contained in:
parent
de3edb7178
commit
848f49801d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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…
Reference in New Issue