diff options
author | Stan Hu <stanhu@gmail.com> | 2015-05-27 15:07:44 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-05-27 15:07:44 +0300 |
commit | ab88b7da19168c66404dfa9dfeb12110ccb8ceea (patch) | |
tree | c53bda448881f0efbce6e282558470f939c792d9 /features | |
parent | 4146ce559e8858604ec91d663eac15f9e5379ff0 (diff) |
Fix project snippets button appearing when it is disabled
Closes #1705
Diffstat (limited to 'features')
-rw-r--r-- | features/project/project.feature | 5 | ||||
-rw-r--r-- | features/steps/project/project.rb | 4 | ||||
-rw-r--r-- | features/steps/shared/project.rb | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/features/project/project.feature b/features/project/project.feature index ef11bceed11..56ae5c78d01 100644 --- a/features/project/project.feature +++ b/features/project/project.feature @@ -68,3 +68,8 @@ Feature: Project When I visit project "Shop" page Then I should not see "New Issue" button And I should not see "New Merge Request" button + + Scenario: I should not see Project snippets + Given I disable snippets in project + When I visit project "Shop" page + Then I should not see "Snippets" button diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index 93fea693f89..fcc15aacc21 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -110,4 +110,8 @@ class Spinach::Features::Project < Spinach::FeatureSteps step 'I should not see "New Merge Request" button' do page.should_not have_link 'New Merge Request' end + + step 'I should not see "Snippets" button' do + page.should_not have_link 'Snippets' + end end diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb index 24136fe421c..3059c4ee041 100644 --- a/features/steps/shared/project.rb +++ b/features/steps/shared/project.rb @@ -14,6 +14,11 @@ module SharedProject @project.team << [@user, :master] end + step 'I disable snippets in project' do + @project.snippets_enabled = false + @project.save + end + step 'I disable issues and merge requests in project' do @project.issues_enabled = false @project.merge_requests_enabled = false |