Commit bebfceb1 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix specs

parent 5a46e22a
...@@ -217,7 +217,7 @@ feature 'Environments', feature: true do ...@@ -217,7 +217,7 @@ feature 'Environments', feature: true do
expect(page).to have_link('Stop') expect(page).to have_link('Stop')
end end
scenario ' scenario 'does allow to stop environment' do' do scenario 'does allow to stop environment' do
click_link('Stop') click_link('Stop')
expect(page).to have_content('close_app') expect(page).to have_content('close_app')
......
...@@ -754,7 +754,7 @@ module Ci ...@@ -754,7 +754,7 @@ module Ci
it 'does return production' do it 'does return production' do
expect(builds.size).to eq(1) expect(builds.size).to eq(1)
expect(builds.first[:environment]).to eq(environment) expect(builds.first[:environment]).to eq(environment)
expect(builds.first[:options]).to include(environment: { name: environment }) expect(builds.first[:options]).to include(environment: { name: environment, action: "start" })
end end
end end
......
...@@ -28,7 +28,7 @@ describe Gitlab::Ci::Config::Node::Environment do ...@@ -28,7 +28,7 @@ describe Gitlab::Ci::Config::Node::Environment do
describe '#value' do describe '#value' do
it 'returns valid hash' do it 'returns valid hash' do
expect(entry.value).to eq(name: 'production') expect(entry.value).to include(name: 'production')
end end
end end
......
...@@ -8,7 +8,7 @@ describe Environment, models: true do ...@@ -8,7 +8,7 @@ describe Environment, models: true do
it { is_expected.to delegate_method(:last_deployment).to(:deployments).as(:last) } it { is_expected.to delegate_method(:last_deployment).to(:deployments).as(:last) }
it { is_expected.to delegate_method(:stop_action).to(:last_deployment).as(:last) } it { is_expected.to delegate_method(:stop_action).to(:last_deployment) }
it { is_expected.to validate_presence_of(:name) } it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_uniqueness_of(:name).scoped_to(:project_id) } it { is_expected.to validate_uniqueness_of(:name).scoped_to(:project_id) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment