Commit 3b635002 authored by Shinya Maeda's avatar Shinya Maeda

3 lines to One line. Correct spec caption.

parent 2b33e9ee
...@@ -20,9 +20,7 @@ class BuildEntity < Grape::Entity ...@@ -20,9 +20,7 @@ class BuildEntity < Grape::Entity
expose :updated_at expose :updated_at
expose :details do expose :details do
expose :detailed_status, expose :detailed_status, as: :status, with: StatusEntity
as: :status,
with: StatusEntity
end end
private private
......
...@@ -12,10 +12,7 @@ class PipelineEntity < Grape::Entity ...@@ -12,10 +12,7 @@ class PipelineEntity < Grape::Entity
end end
expose :details do expose :details do
expose :detailed_status, expose :detailed_status, as: :status, with: StatusEntity
as: :status,
with: StatusEntity
expose :duration expose :duration
expose :finished_at expose :finished_at
expose :stages, using: StageEntity expose :stages, using: StageEntity
......
...@@ -21,7 +21,7 @@ describe Projects::BuildsController do ...@@ -21,7 +21,7 @@ describe Projects::BuildsController do
format: :json format: :json
end end
it 'returns pipeline status via BuildSerializer' do it 'return a correct pipeline status' do
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(json_response['details']['status']['text']).to eq 'passed' expect(json_response['details']['status']['text']).to eq 'passed'
end end
......
...@@ -1192,7 +1192,7 @@ describe Projects::MergeRequestsController do ...@@ -1192,7 +1192,7 @@ describe Projects::MergeRequestsController do
format: :json format: :json
end end
it 'returns pipeline status via PipelineSerializer' do it 'return a correct pipeline status' do
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(json_response['details']['status']['text']).to eq 'passed' expect(json_response['details']['status']['text']).to eq 'passed'
end end
......
...@@ -80,7 +80,7 @@ describe Projects::PipelinesController do ...@@ -80,7 +80,7 @@ describe Projects::PipelinesController do
format: :json format: :json
end end
it 'returns pipeline status via PipelineSerializer' do it 'return a correct pipeline status' do
expect(response).to have_http_status(:ok) expect(response).to have_http_status(:ok)
expect(json_response['details']['status']['text']).to eq 'passed' expect(json_response['details']['status']['text']).to eq 'passed'
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