summaryrefslogtreecommitdiff
path: root/features/steps
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-11-22 16:06:42 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-11-22 17:31:27 +0800
commit28102ec28e1ef3d3203db3d05aa89ab3da234e70 (patch)
tree522d3d898cdf12f947f4d08f3d5487284eb244dc /features/steps
parent60fe975452f6781198188ae985bad7329d1aff05 (diff)
downloadgitlab-ce-28102ec28e1ef3d3203db3d05aa89ab3da234e70.tar.gz
Allow admin to set keys with write access, and
show write access information when showing the key. TODO: It's ugly right now, need help!
Diffstat (limited to 'features/steps')
-rw-r--r--features/steps/admin/deploy_keys.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/features/steps/admin/deploy_keys.rb b/features/steps/admin/deploy_keys.rb
index 56787eeb6b3..79312a5d1c5 100644
--- a/features/steps/admin/deploy_keys.rb
+++ b/features/steps/admin/deploy_keys.rb
@@ -32,12 +32,25 @@ class Spinach::Features::AdminDeployKeys < Spinach::FeatureSteps
click_button "Create"
end
+ step 'I submit new deploy key with write access' do
+ fill_in "deploy_key_title", with: "server"
+ fill_in "deploy_key_key", with: "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzrEJUIR6Y03TCE9rIJ+GqTBvgb8t1jI9h5UBzCLuK4VawOmkLornPqLDrGbm6tcwM/wBrrLvVOqi2HwmkKEIecVO0a64A4rIYScVsXIniHRS6w5twyn1MD3sIbN+socBDcaldECQa2u1dI3tnNVcs8wi77fiRe7RSxePsJceGoheRQgC8AZ510UdIlO+9rjIHUdVN7LLyz512auAfYsgx1OfablkQ/XJcdEwDNgi9imI6nAXhmoKUm1IPLT2yKajTIC64AjLOnE0YyCh6+7RFMpiMyu1qiOCpdjYwTgBRiciNRZCH8xIedyCoAmiUgkUT40XYHwLuwiPJICpkAzp7Q== user@laptop"
+ check "deploy_key_can_push"
+ click_button "Create"
+ end
+
step 'I should be on admin deploy keys page' do
expect(current_path).to eq admin_deploy_keys_path
end
- step 'I should see newly created deploy key' do
+ step 'I should see newly created deploy key without write access' do
+ expect(page).to have_content(deploy_key.title)
+ expect(page).to have_content('No')
+ end
+
+ step 'I should see newly created deploy key with write access' do
expect(page).to have_content(deploy_key.title)
+ expect(page).to have_content('Yes')
end
def deploy_key