summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-06-16 16:53:02 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-06-16 16:53:02 +0200
commit64bb0d37d4ef1f8574355019f198e40bc9b70224 (patch)
treec4335dbfe28d6810262aef1fc7bb875560695907 /spec/controllers/projects
parentb97d5b65dd40fb5d8753c0677534e82cb5636f2d (diff)
downloadgitlab-ce-64bb0d37d4ef1f8574355019f198e40bc9b70224.tar.gz
cleanup wip
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/deployments_controller_spec.rb2
-rw-r--r--spec/controllers/projects/environments_controller_spec.rb12
2 files changed, 9 insertions, 5 deletions
diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb
index 26d92e787c4..c3b4f812db9 100644
--- a/spec/controllers/projects/deployments_controller_spec.rb
+++ b/spec/controllers/projects/deployments_controller_spec.rb
@@ -42,6 +42,7 @@ describe Projects::DeploymentsController do
before do
allow(controller).to receive(:deployment).and_return(deployment)
end
+
context 'when metrics are disabled' do
before do
allow(deployment).to receive(:has_metrics?).and_return false
@@ -114,6 +115,7 @@ describe Projects::DeploymentsController do
before do
allow(controller).to receive(:deployment).and_return(deployment)
end
+
context 'when metrics are disabled' do
before do
allow(deployment).to receive(:has_metrics?).and_return false
diff --git a/spec/controllers/projects/environments_controller_spec.rb b/spec/controllers/projects/environments_controller_spec.rb
index ab171cde6bf..749b090d6e0 100644
--- a/spec/controllers/projects/environments_controller_spec.rb
+++ b/spec/controllers/projects/environments_controller_spec.rb
@@ -338,11 +338,13 @@ describe Projects::EnvironmentsController do
context 'when environment has some metrics' do
before do
- expect(environment).to receive(:additional_metrics).and_return({
- success: true,
- data: {},
- last_update: 42
- })
+ expect(environment)
+ .to receive(:additional_metrics)
+ .and_return({
+ success: true,
+ data: {},
+ last_update: 42
+ })
end
it 'returns a metrics JSON document' do