summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-11 11:14:55 +0100
committerGrzegorz Bizon <grzegorz.bizon@ntsn.pl>2015-12-11 11:14:55 +0100
commit28ad40d9740076677420612443358c2976fe0916 (patch)
tree4207c66bd87d24c3a32354f11c7e7f080a62ae95
parent2da3cf314651d22f85059d99476ec7952950b44f (diff)
downloadgitlab-ce-28ad40d9740076677420612443358c2976fe0916.tar.gz
Add specs for feature that regenerates runners token
-rw-r--r--spec/features/ci/admin/runners_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/ci/admin/runners_spec.rb b/spec/features/ci/admin/runners_spec.rb
index b83744f53a8..0c5aebb3a7b 100644
--- a/spec/features/ci/admin/runners_spec.rb
+++ b/spec/features/ci/admin/runners_spec.rb
@@ -61,4 +61,26 @@ describe "Admin Runners" do
it { expect(page).not_to have_content(@project2.name_with_namespace) }
end
end
+
+ describe 'runners registration token' do
+ let!(:token) { current_application_settings.runners_registration_token }
+ before { visit ci_admin_runners_path }
+
+ it 'has a registration token' do
+ expect(page).to have_content("Registration token is #{token}")
+ expect(page).to have_selector('#runners-token', text: token)
+ end
+
+ describe 'reload registration token' do
+ let(:page_token) { find('#runners-token').text }
+
+ before do
+ click_button 'Reset runners registration token'
+ end
+
+ it 'changes registration token' do
+ expect(page_token).to_not eq token
+ end
+ end
+ end
end