Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Jankovski <maxlazio@gmail.com>2014-12-29 20:40:25 +0300
committerMarin Jankovski <maxlazio@gmail.com>2014-12-29 20:40:25 +0300
commitc1e57b47b81db4b3959b0ce63d7f65cb6cdf6f57 (patch)
tree71af4716a35422279ab1c1cba938e7af2a54661a /features/steps/admin
parentf0085d034b33adc78753e2952a5e04842ca979e3 (diff)
Add feature spec for user ssh keys on admin page.
Diffstat (limited to 'features/steps/admin')
-rw-r--r--features/steps/admin/users.rb32
1 files changed, 32 insertions, 0 deletions
diff --git a/features/steps/admin/users.rb b/features/steps/admin/users.rb
index 546c1bf2a12..e1383097248 100644
--- a/features/steps/admin/users.rb
+++ b/features/steps/admin/users.rb
@@ -82,4 +82,36 @@ class Spinach::Features::AdminUsers < Spinach::FeatureSteps
page.should have_content 'Account'
page.should have_content 'Personal projects limit'
end
+
+ step 'user "Pete" with ssh keys' do
+ user = create(:user, name: 'Pete')
+ create(:key, user: user, title: "ssh-rsa Key1", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4FIEBXGi4bPU8kzxMefudPIJ08/gNprdNTaO9BR/ndy3+58s2HCTw2xCHcsuBmq+TsAqgEidVq4skpqoTMB+Uot5Uzp9z4764rc48dZiI661izoREoKnuRQSsRqUTHg5wrLzwxlQbl1MVfRWQpqiz/5KjBC7yLEb9AbusjnWBk8wvC1bQPQ1uLAauEA7d836tgaIsym9BrLsMVnR4P1boWD3Xp1B1T/ImJwAGHvRmP/ycIqmKdSpMdJXwxcb40efWVj0Ibbe7ii9eeoLdHACqevUZi6fwfbymdow+FeqlkPoHyGg3Cu4vD/D8+8cRc7mE/zGCWcQ15Var83Tczour Key1")
+ create(:key, user: user, title: "ssh-rsa Key2", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2")
+ end
+
+ step 'click on user "Pete"' do
+ click_link 'Pete'
+ end
+
+ step 'I should see key list' do
+ page.should have_content 'ssh-rsa Key2'
+ page.should have_content 'ssh-rsa Key1'
+ end
+
+ step 'I click on the key title' do
+ click_link 'ssh-rsa Key2'
+ end
+
+ step 'I should see key details' do
+ page.should have_content 'ssh-rsa Key2'
+ page.should have_content 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQSTWXhJAX/He+nG78MiRRRn7m0Pb0XbcgTxE0etArgoFoh9WtvDf36HG6tOSg/0UUNcp0dICsNAmhBKdncp6cIyPaXJTURPRAGvhI0/VDk4bi27bRnccGbJ/hDaUxZMLhhrzY0r22mjVf8PF6dvv5QUIQVm1/LeaWYsHHvLgiIjwrXirUZPnFrZw6VLREoBKG8uWvfSXw1L5eapmstqfsME8099oi+vWLR8MgEysZQmD28M73fgW4zek6LDQzKQyJx9nB+hJkKUDvcuziZjGmRFlNgSA2mguERwL1OXonD8WYUrBDGKroIvBT39zS5d9tQDnidEJZ9Y8gv5ViYP7x Key2'
+ end
+
+ step 'I click on remove key' do
+ click_link 'Remove'
+ end
+
+ step 'I should see the key removed' do
+ page.should_not have_content 'ssh-rsa Key2'
+ end
end