summaryrefslogtreecommitdiff
path: root/spec/features/variables_spec.rb
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-06-08 06:57:49 +0000
committerValery Sizov <valery@gitlab.com>2015-06-08 06:57:49 +0000
commit10c1ce31035539e0c87ae6439937ada230285b49 (patch)
treeec22cc9986214acbeb4f6c726aff4561f22f25e7 /spec/features/variables_spec.rb
parent06f586c8e85d100070745e8453bf9dc1b2528451 (diff)
parentb0d6438548a86084cb4c45d4dd92aeae54d09201 (diff)
downloadgitlab-ci-10c1ce31035539e0c87ae6439937ada230285b49.tar.gz
Merge branch 'variables' into 'master'
Implementation of secret variables https://dev.gitlab.org/gitlab/gitlab-ci/issues/246 @ayufan It will return variables like an array: API call - POST `builds/register` ``` variables:[{"key": "KEY", "value": "VALUE"}] ``` ![joxi_screenshot_1433524410263](https://gitlab.com/gitlab-org/gitlab-ci/uploads/04c2442b939d58c432f7b3fb72a2baa8/joxi_screenshot_1433524410263.png) /cc @dzaporozhets @ayufan See merge request !125
Diffstat (limited to 'spec/features/variables_spec.rb')
-rw-r--r--spec/features/variables_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/features/variables_spec.rb b/spec/features/variables_spec.rb
new file mode 100644
index 0000000..21a7a11
--- /dev/null
+++ b/spec/features/variables_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe "Variables" do
+ before do
+ login_as :user
+ end
+
+ describe "specific runners" do
+ before do
+ @project = FactoryGirl.create :project
+ stub_js_gitlab_calls
+ end
+
+ it "creates variable", js: true do
+ visit project_variables_path(@project)
+ click_on "Add a variable"
+ fill_in "Key", with: "SECRET_KEY"
+ fill_in "Value", with: "SECRET_VALUE"
+ click_on "Save changes"
+
+ page.should have_content("Project was successfully updated.")
+ @project.variables.count.should == 1
+ end
+
+ end
+end