diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-16 16:53:02 +0200 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2017-06-16 16:53:02 +0200 |
commit | 64bb0d37d4ef1f8574355019f198e40bc9b70224 (patch) | |
tree | c4335dbfe28d6810262aef1fc7bb875560695907 /spec | |
parent | b97d5b65dd40fb5d8753c0677534e82cb5636f2d (diff) | |
download | gitlab-ce-64bb0d37d4ef1f8574355019f198e40bc9b70224.tar.gz |
cleanup wip
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/projects/deployments_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/controllers/projects/environments_controller_spec.rb | 12 | ||||
-rw-r--r-- | spec/javascripts/fixtures/prometheus_service.rb | 1 |
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 |