parent
4146ce559e
commit
ab88b7da19
4 changed files with 15 additions and 1 deletions
|
@ -115,7 +115,7 @@ class Ability
|
|||
end
|
||||
|
||||
unless project.snippets_enabled
|
||||
rules -= named_abilities('snippet')
|
||||
rules -= named_abilities('project_snippet')
|
||||
end
|
||||
|
||||
unless project.wiki_enabled
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue