summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-28 16:47:18 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-28 16:47:18 +0200
commitb65641959165e8d7daf47f921b058a647189a060 (patch)
treef6d14d73b63006ca4b917adda6694d4285743fe3 /spec
parentd8e631c1e5de535864f36e985e9bfbc4a8482916 (diff)
parentc876bfa0f28ddae7fbca314505f5b150b9cec194 (diff)
downloadgitlab-ce-b65641959165e8d7daf47f921b058a647189a060.tar.gz
Merge branch 'move-runners-page'
Diffstat (limited to 'spec')
-rw-r--r--spec/features/runners_spec.rb (renamed from spec/features/ci/runners_spec.rb)25
1 files changed, 8 insertions, 17 deletions
diff --git a/spec/features/ci/runners_spec.rb b/spec/features/runners_spec.rb
index 15147f15eb3..06adb7633b2 100644
--- a/spec/features/ci/runners_spec.rb
+++ b/spec/features/runners_spec.rb
@@ -1,11 +1,10 @@
require 'spec_helper'
describe "Runners" do
- let(:user) { create(:user) }
+ include GitlabRoutingHelper
- before do
- login_as(user)
- end
+ let(:user) { create(:user) }
+ before { login_as(user) }
describe "specific runners" do
before do
@@ -20,18 +19,17 @@ describe "Runners" do
@specific_runner2 = FactoryGirl.create :ci_specific_runner
@project.runners << @specific_runner
@project2.runners << @specific_runner2
+
+ visit runners_path(@project.gl_project)
end
it "places runners in right places" do
- visit ci_project_runners_path(@project)
expect(page.find(".available-specific-runners")).to have_content(@specific_runner2.display_name)
expect(page.find(".activated-specific-runners")).to have_content(@specific_runner.display_name)
expect(page.find(".available-shared-runners")).to have_content(@shared_runner.display_name)
end
it "enables specific runner for project" do
- visit ci_project_runners_path(@project)
-
within ".available-specific-runners" do
click_on "Enable for this project"
end
@@ -41,8 +39,7 @@ describe "Runners" do
it "disables specific runner for project" do
@project2.runners << @specific_runner
-
- visit ci_project_runners_path(@project)
+ visit runners_path(@project.gl_project)
within ".activated-specific-runners" do
click_on "Disable for this project"
@@ -52,8 +49,6 @@ describe "Runners" do
end
it "removes specific runner for project if this is last project for that runners" do
- visit ci_project_runners_path(@project)
-
within ".activated-specific-runners" do
click_on "Remove runner"
end
@@ -66,13 +61,11 @@ describe "Runners" do
before do
@project = FactoryGirl.create :ci_project
@project.gl_project.team << [user, :master]
+ visit runners_path(@project.gl_project)
end
it "enables shared runners" do
- visit ci_project_runners_path(@project)
-
click_on "Enable shared runners"
-
expect(@project.reload.shared_runners_enabled).to be_truthy
end
end
@@ -83,13 +76,11 @@ describe "Runners" do
@project.gl_project.team << [user, :master]
@specific_runner = FactoryGirl.create :ci_specific_runner
@project.runners << @specific_runner
+ visit runners_path(@project.gl_project)
end
it "shows runner information" do
- visit ci_project_runners_path(@project)
-
click_on @specific_runner.short_sha
-
expect(page).to have_content(@specific_runner.platform)
end
end