diff options
author | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2016-11-17 13:33:53 -0600 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.dunstone@gmail.com> | 2016-11-17 13:31:37 -0700 |
commit | 9ed7171a6a8c98858949891b298789a97c4f3fba (patch) | |
tree | 31bab0f4222f98d365860c1ed4104bbcbcf58adc /spec/views | |
parent | 43906336ff24e218cb1f7024d63a22367dd7e09a (diff) | |
download | gitlab-ce-9ed7171a6a8c98858949891b298789a97c4f3fba.tar.gz |
Fix builds/show spec; use iid instead of id23205-information-about-environments-build-page
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/builds/show.html.haml_spec.rb | 12 |
1 files changed, 8 insertions, 4 deletions
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( |