diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-03 13:40:14 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-03 13:40:14 +0300 |
commit | 9b3624071ec8932d468213109486f462a1770a2a (patch) | |
tree | f3ec962712439a753b67bab468936f67f062dc83 /features/steps/project/deploy_keys.rb | |
parent | ed097df62758880eb6412770f661266d4a6e9299 (diff) |
Add project deploy keys tests.
Diffstat (limited to 'features/steps/project/deploy_keys.rb')
-rw-r--r-- | features/steps/project/deploy_keys.rb | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/features/steps/project/deploy_keys.rb b/features/steps/project/deploy_keys.rb index 4bf5cb5fa40..50e14513a7a 100644 --- a/features/steps/project/deploy_keys.rb +++ b/features/steps/project/deploy_keys.rb @@ -7,12 +7,24 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps create(:deploy_keys_project, project: @project) end - step 'I should see project deploy keys' do + step 'I should see project deploy key' do within '.enabled-keys' do page.should have_content deploy_key.title end end + step 'I should see other project deploy key' do + within '.available-keys' do + page.should have_content other_deploy_key.title + end + end + + step 'I should see public deploy key' do + within '.available-keys' do + page.should have_content public_deploy_key.title + end + end + step 'I click \'New Deploy Key\'' do click_link 'New Deploy Key' end @@ -39,6 +51,10 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps create(:deploy_keys_project, project: @second_project) end + step 'public deploy key exists' do + create(:deploy_key, public: true) + end + step 'I click attach deploy key' do within '.available-keys' do click_link 'Enable' @@ -50,4 +66,12 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps def deploy_key @project.deploy_keys.last end + + def other_deploy_key + @second_project.deploy_keys.last + end + + def public_deploy_key + DeployKey.are_public.last + end end |