2015-08-25 21:42:46 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Variables" do
|
2015-09-28 11:19:20 -04:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
before { login_as(user) }
|
2015-08-25 21:42:46 -04:00
|
|
|
|
|
|
|
describe "specific runners" do
|
|
|
|
before do
|
2015-09-15 09:42:02 -04:00
|
|
|
@project = FactoryGirl.create :ci_project
|
2015-09-28 11:19:20 -04:00
|
|
|
@gl_project = @project.gl_project
|
|
|
|
@gl_project.team << [user, :master]
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
it "creates variable", js: true do
|
2015-09-28 11:19:20 -04:00
|
|
|
visit namespace_project_variables_path(@gl_project.namespace, @gl_project)
|
2015-08-25 21:42:46 -04:00
|
|
|
click_on "Add a variable"
|
|
|
|
fill_in "Key", with: "SECRET_KEY"
|
|
|
|
fill_in "Value", with: "SECRET_VALUE"
|
|
|
|
click_on "Save changes"
|
2015-09-28 11:19:20 -04:00
|
|
|
|
2015-09-10 10:55:09 -04:00
|
|
|
expect(page).to have_content("Variables were successfully updated.")
|
|
|
|
expect(@project.variables.count).to eq(1)
|
2015-08-25 21:42:46 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|