Add specs for feature that regenerates runners token

This commit is contained in:
Grzegorz Bizon 2015-12-11 11:14:55 +01:00
parent 2da3cf3146
commit 28ad40d974
1 changed files with 22 additions and 0 deletions

View File

@ -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