debian-mirror-gitlab/spec/features/variables_spec.rb

25 lines
655 B
Ruby
Raw Normal View History

2015-09-25 12:07:36 +05:30
require 'spec_helper'
describe "Variables" do
2015-10-24 18:46:33 +05:30
let(:user) { create(:user) }
before { login_as(user) }
2015-09-25 12:07:36 +05:30
describe "specific runners" do
before do
2015-12-23 02:04:40 +05:30
@project = FactoryGirl.create :empty_project
@project.team << [user, :master]
2015-09-25 12:07:36 +05:30
end
it "creates variable", js: true do
2015-12-23 02:04:40 +05:30
visit namespace_project_variables_path(@project.namespace, @project)
2015-09-25 12:07:36 +05:30
click_on "Add a variable"
fill_in "Key", with: "SECRET_KEY"
fill_in "Value", with: "SECRET_VALUE"
click_on "Save changes"
2015-10-24 18:46:33 +05:30
2015-09-25 12:07:36 +05:30
expect(page).to have_content("Variables were successfully updated.")
expect(@project.variables.count).to eq(1)
end
end
end