diff options
author | Robert Speicher <robert@gitlab.com> | 2015-12-09 19:52:43 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-12-09 19:52:43 +0300 |
commit | c3676aa156981092b7f03f1a3e74bb819cfa2fc3 (patch) | |
tree | 3b56ade62c92598f80f4263238c94c568c0245ae /features/steps/shared | |
parent | 1954bd6ee0e17d29061ed201cbd0f509e6b2a49d (diff) | |
parent | bb79573c01ad77d6b52245d3af262bc56f79693f (diff) |
Merge branch 'default_clone_protocol_based_on_user_keys' into 'master'
When rendering the clone page, check user profile to decide default
clone protocol
If the user has uploaded SSH-keys, use SSH; otherwise, use http(s).
Closes #3504.
See merge request !1998
Diffstat (limited to 'features/steps/shared')
-rw-r--r-- | features/steps/shared/user.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/features/steps/shared/user.rb b/features/steps/shared/user.rb index 250cc5b94f3..33c146f6dbc 100644 --- a/features/steps/shared/user.rb +++ b/features/steps/shared/user.rb @@ -18,4 +18,12 @@ module SharedUser def user_exists(name, options = {}) User.find_by(name: name) || create(:user, { name: name, admin: false }.merge(options)) end + + step 'I have an ssh key' do + create(:key, user: @user, title: "An ssh-key", key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+L3TbFegm3k8QjejSwemk4HhlRh+DuN679Pc5ckqE/MPhVtE/+kZQDYCTB284GiT2aIoGzmZ8ee9TkaoejAsBwlA+Wz2Q3vhz65X6sMgalRwpdJx8kSEUYV8ZPV3MZvPo8KdNg993o4jL6G36GDW4BPIyO6FPZhfsawdf6liVD0Xo5kibIK7B9VoE178cdLQtLpS2YolRwf5yy6XR6hbbBGQR+6xrGOdP16eGZDb1CE2bMvvJijjloFqPscGktWOqW+nfh5txwFfBzlfARDTBsS8WZtg3Yoj1kn33kPsWRlgHfNutFRAIynDuDdQzQq8tTtVwm+Yi75RfcPHW8y3P Work") + end + + step 'I have no ssh keys' do + Key.delete_all + end end |