From c4e45d89d407016c89c5217cb91a7a82cf8710f1 Mon Sep 17 00:00:00 2001
From: Kamil Trzcinski <ayufan@ayufan.eu>
Date: Tue, 18 Oct 2016 13:51:12 +0200
Subject: [PATCH] Fix remaining offenses

---
 spec/features/merge_requests/widget_deployments_spec.rb | 2 +-
 spec/models/environment_spec.rb                         | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/spec/features/merge_requests/widget_deployments_spec.rb b/spec/features/merge_requests/widget_deployments_spec.rb
index 1be35b27d84..6676821b807 100644
--- a/spec/features/merge_requests/widget_deployments_spec.rb
+++ b/spec/features/merge_requests/widget_deployments_spec.rb
@@ -32,7 +32,7 @@ feature 'Widget Deployments Header', feature: true, js: true do
       given(:manual) { create(:ci_build, :manual, pipeline: pipeline, name: 'close_app') }
       given(:deployment) do
         create(:deployment, environment: environment, ref: merge_request.target_branch,
-               sha: sha, deployable: build, on_stop: 'close_app')
+                            sha: sha, deployable: build, on_stop: 'close_app')
       end
 
       background do
diff --git a/spec/models/environment_spec.rb b/spec/models/environment_spec.rb
index e1755f940b3..a94e6d0165f 100644
--- a/spec/models/environment_spec.rb
+++ b/spec/models/environment_spec.rb
@@ -150,8 +150,8 @@ describe Environment, models: true do
         let!(:close_action) { create(:ci_build, :manual, pipeline: build.pipeline, name: 'close_app') }
 
         it 'returns the same action' do
-          is_expected.to eq(close_action)
-          is_expected.to include(user: user)
+          expect(subject).to eq(close_action)
+          expect(subject.user).to eq(user)
         end
       end
 
@@ -160,7 +160,8 @@ describe Environment, models: true do
 
         it 'returns a new action of the same type' do
           is_expected.to be_persisted
-          is_expected.to include(name: close_action.name, user: user)
+          expect(subject.name).to eq(close_action.name)
+          expect(subject.user).to eq(user)
         end
       end
     end
-- 
GitLab