summaryrefslogtreecommitdiff
path: root/spec
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
parentb97d5b65dd40fb5d8753c0677534e82cb5636f2d (diff)
downloadgitlab-ce-64bb0d37d4ef1f8574355019f198e40bc9b70224.tar.gz
cleanup wip
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects/deployments_controller_spec.rb2
-rw-r--r--spec/controllers/projects/environments_controller_spec.rb12
-rw-r--r--spec/javascripts/fixtures/prometheus_service.rb1
3 files changed, 9 insertions, 6 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
diff --git a/spec/javascripts/fixtures/prometheus_service.rb b/spec/javascripts/fixtures/prometheus_service.rb
index 7dfbf885fbd..4aa6ea3cdfc 100644
--- a/spec/javascripts/fixtures/prometheus_service.rb
+++ b/spec/javascripts/fixtures/prometheus_service.rb
@@ -8,7 +8,6 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
let(:project) { create(:project_empty_repo, namespace: namespace, path: 'services-project') }
let!(:service) { create(:prometheus_service, project: project) }
-
render_views
before(:all) do