diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2015-12-14 16:27:29 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2015-12-14 16:27:29 +0300 |
commit | 3fb89a36cb2c8bead62f4985ebdda1e05f8114df (patch) | |
tree | 844840c13d93f399458986ba88c9d8e983d840d8 /spec/features | |
parent | 73ba411af9f4552e72230d2b9852399e66a23260 (diff) | |
parent | 6586856a1572535e0b9ca2f9021dfd88a158ffdd (diff) |
Merge branch 'ci/persist-registration-token' into 'master'
Persist CI runners registration token
This MR adds feature of persisting CI runners registration token.
User will be able to generate and then reset (if necessary to revoke) this token.
This closes #3703
cc @ayufan
See merge request !2039
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_runners_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/admin/admin_runners_spec.rb b/spec/features/admin/admin_runners_spec.rb index b1f2d401042..66a2cc0c157 100644 --- a/spec/features/admin/admin_runners_spec.rb +++ b/spec/features/admin/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.ensure_runners_registration_token } + before { visit 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 |