From 9ed7171a6a8c98858949891b298789a97c4f3fba Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Thu, 17 Nov 2016 13:33:53 -0600 Subject: Fix builds/show spec; use iid instead of id --- spec/views/projects/builds/show.html.haml_spec.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'spec/views') diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index 3b9a9c95daa..e0c77201116 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -40,6 +40,10 @@ describe 'projects/builds/show', :view do create(:ci_build, :success, environment: 'staging', pipeline: pipeline) end + let(:second_build) do + create(:ci_build, :success, environment: 'staging', pipeline: pipeline) + end + let(:environment) do create(:environment, name: 'staging', project: project) end @@ -49,12 +53,12 @@ describe 'projects/builds/show', :view do end let!(:second_deployment) do - create(:deployment, environment: environment, deployable: build) + create(:deployment, environment: environment, deployable: second_build) end it 'shows deployment message' do expected_text = 'This build is an out-of-date deployment ' \ - "to staging.\nView the most recent deployment ##{second_deployment.id}." + "to staging.\nView the most recent deployment ##{second_deployment.iid}." render expect(rendered).to have_css('.environment-information', text: expected_text) @@ -71,7 +75,7 @@ describe 'projects/builds/show', :view do end it 'shows deployment message' do - expected_text = 'The deployment of this build to staging did not complete.' + expected_text = 'The deployment of this build to staging did not succeed.' render expect(rendered).to have_css( @@ -107,7 +111,7 @@ describe 'projects/builds/show', :view do end it 'shows deployment message' do - expected_text = 'The deployment of this build to staging did not complete' + expected_text = 'The deployment of this build to staging did not succeed' render expect(rendered).to have_css( -- cgit v1.2.3