diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-17 17:17:20 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-17 17:17:20 +0300 |
commit | 045dad3cf17f7e5562dde847ae6d9e9118cfa5ba (patch) | |
tree | 9d8de5630b850215a1a19b1d1a942629d4a2c6fb /spec | |
parent | dbd534a8537ba02b93dcf673aee0b62d51bf129d (diff) |
Test for enabling/disabling runners from admin runner page
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/admin/admin_runners_spec.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index 9499cd4e025..2d297776cb0 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/admin_runners_spec.rb @@ -60,6 +60,40 @@ describe "Admin Runners" do it { expect(page).to have_content(@project1.name_with_namespace) } it { expect(page).not_to have_content(@project2.name_with_namespace) } end + + describe 'enable/create' do + before do + @project1.runners << runner + visit admin_runner_path(runner) + end + + it 'enables specific runner for project' do + within '.unassigned-projects' do + click_on 'Enable' + end + + assigned_project = page.find('.assigned-projects') + + expect(assigned_project).to have_content(@project2.path) + end + end + + describe 'disable/destroy' do + before do + @project1.runners << runner + visit admin_runner_path(runner) + end + + it 'enables specific runner for project' do + within '.assigned-projects' do + click_on 'Disable' + end + + new_runner_project = page.find('.unassigned-projects') + + expect(new_runner_project).to have_content(@project1.path) + end + end end describe 'runners registration token' do |