From 3b635002976e1dd45e58271efdb71f7349719d02 Mon Sep 17 00:00:00 2001
From: Shinya Maeda <gitlab.shinyamaeda@gmail.com>
Date: Fri, 10 Mar 2017 21:56:35 +0900
Subject: [PATCH] 3 lines to One line. Correct spec caption.

---
 app/serializers/build_entity.rb                             | 4 +---
 app/serializers/pipeline_entity.rb                          | 5 +----
 spec/controllers/projects/builds_controller_spec.rb         | 2 +-
 spec/controllers/projects/merge_requests_controller_spec.rb | 2 +-
 spec/controllers/projects/pipelines_controller_spec.rb      | 2 +-
 5 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/app/serializers/build_entity.rb b/app/serializers/build_entity.rb
index 10151d94e68..35566c55950 100644
--- a/app/serializers/build_entity.rb
+++ b/app/serializers/build_entity.rb
@@ -20,9 +20,7 @@ class BuildEntity < Grape::Entity
   expose :updated_at
 
   expose :details do
-    expose :detailed_status,
-        as: :status,
-        with: StatusEntity
+    expose :detailed_status, as: :status, with: StatusEntity
   end
 
   private
diff --git a/app/serializers/pipeline_entity.rb b/app/serializers/pipeline_entity.rb
index 1c1fa9e3dee..3f16dd66d54 100644
--- a/app/serializers/pipeline_entity.rb
+++ b/app/serializers/pipeline_entity.rb
@@ -12,10 +12,7 @@ class PipelineEntity < Grape::Entity
   end
 
   expose :details do
-    expose :detailed_status,
-      as: :status,
-      with: StatusEntity
-
+    expose :detailed_status, as: :status, with: StatusEntity
     expose :duration
     expose :finished_at
     expose :stages, using: StageEntity
diff --git a/spec/controllers/projects/builds_controller_spec.rb b/spec/controllers/projects/builds_controller_spec.rb
index 53a307aa362..4411069918a 100644
--- a/spec/controllers/projects/builds_controller_spec.rb
+++ b/spec/controllers/projects/builds_controller_spec.rb
@@ -21,7 +21,7 @@ describe Projects::BuildsController do
                      format: :json
       end
 
-      it 'returns pipeline status via BuildSerializer' do
+      it 'return a correct pipeline status' do
         expect(response).to have_http_status(:ok)
         expect(json_response['details']['status']['text']).to eq 'passed'
       end
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb
index 2cbb46d8274..3bcea2b6517 100644
--- a/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -1192,7 +1192,7 @@ describe Projects::MergeRequestsController do
                      format: :json
       end
 
-      it 'returns pipeline status via PipelineSerializer' do
+      it 'return a correct pipeline status' do
         expect(response).to have_http_status(:ok)
         expect(json_response['details']['status']['text']).to eq 'passed'
       end
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb
index 5a9e02331f7..aa6415d58e8 100644
--- a/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_controller_spec.rb
@@ -80,7 +80,7 @@ describe Projects::PipelinesController do
                      format: :json
       end
 
-      it 'returns pipeline status via PipelineSerializer' do
+      it 'return a correct pipeline status' do
         expect(response).to have_http_status(:ok)
         expect(json_response['details']['status']['text']).to eq 'passed'
       end
-- 
GitLab