Add pipeline variables feature spec
This commit is contained in:
parent
c6e394bb84
commit
3417221ee6
|
@ -522,6 +522,21 @@ describe 'Pipelines', :js do
|
||||||
|
|
||||||
expect(Ci::Pipeline.last).to be_web
|
expect(Ci::Pipeline.last).to be_web
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when variables are specified' do
|
||||||
|
it 'creates a new pipeline with variables' do
|
||||||
|
page.within '.ci-variable-row-body' do
|
||||||
|
fill_in "Input variable key", with: "key_name"
|
||||||
|
fill_in "Input variable value", with: "value"
|
||||||
|
end
|
||||||
|
|
||||||
|
expect { click_on 'Create pipeline' }
|
||||||
|
.to change { Ci::Pipeline.count }.by(1)
|
||||||
|
|
||||||
|
expect(Ci::Pipeline.last.variables.map { |var| var.slice(:key, :secret_value) })
|
||||||
|
.to eq [{ key: "key_name", secret_value: "value" }.with_indifferent_access]
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'without gitlab-ci.yml' do
|
context 'without gitlab-ci.yml' do
|
||||||
|
|
Loading…
Reference in New Issue