BigW Consortium Gitlab

add entity and update spec

parent de3edb71
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment