summaryrefslogtreecommitdiff
path: root/spec/features/variables_spec.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-28 17:19:20 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-28 17:19:20 +0200
commit037defc7def3e2d0f2de4930516149d7567362fc (patch)
tree241fcb845c9ba67626f65af358fba4a6f38944d5 /spec/features/variables_spec.rb
parentb65641959165e8d7daf47f921b058a647189a060 (diff)
downloadgitlab-ce-037defc7def3e2d0f2de4930516149d7567362fc.tar.gz
Move CI variables page to project settingsmove-variables-page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/features/variables_spec.rb')
-rw-r--r--spec/features/variables_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/features/variables_spec.rb b/spec/features/variables_spec.rb
new file mode 100644
index 00000000000..adb602f3edd
--- /dev/null
+++ b/spec/features/variables_spec.rb
@@ -0,0 +1,25 @@
+require 'spec_helper'
+
+describe "Variables" do
+ let(:user) { create(:user) }
+ before { login_as(user) }
+
+ describe "specific runners" do
+ before do
+ @project = FactoryGirl.create :ci_project
+ @gl_project = @project.gl_project
+ @gl_project.team << [user, :master]
+ end
+
+ it "creates variable", js: true do
+ visit namespace_project_variables_path(@gl_project.namespace, @gl_project)
+ click_on "Add a variable"
+ fill_in "Key", with: "SECRET_KEY"
+ fill_in "Value", with: "SECRET_VALUE"
+ click_on "Save changes"
+
+ expect(page).to have_content("Variables were successfully updated.")
+ expect(@project.variables.count).to eq(1)
+ end
+ end
+end