Welcome to mirror list, hosted at ThFree Co, Russian Federation.

variables_spec.rb « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: afea1840cd742d0e9673743521e0ab759fc59946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'spec_helper'

describe "Variables" do
  let(:user) { create(:user) }
  before { login_as(user) }

  describe "specific runners" do
    before do
      @project = FactoryGirl.create :empty_project
      @project.team << [user, :master]
    end

    it "creates variable", js: true do
      visit namespace_project_variables_path(@project.namespace, @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