Added more negative checks for public project

This commit is contained in:
Tim Zallmann 2017-06-08 00:37:45 +02:00
parent 81b565ee36
commit 39d976cf58

View file

@ -4,8 +4,8 @@ feature 'Top Plus Menu', feature: true, js: true do
let(:user) { create :user }
let(:guest_user) { create :user}
let(:group) { create(:group) }
let(:public_group) { create(:group, :public) }
let(:project) { create(:project, :repository, creator: user, namespace: user.namespace) }
let(:public_project) { create(:project, :public) }
before do
group.add_owner(user)
@ -127,6 +127,24 @@ feature 'Top Plus Menu', feature: true, js: true do
expect(find('.header-new.dropdown')).not_to have_selector('.header-new-project-snippet')
end
scenario 'public project has no New Issue Button' do
visit namespace_project_path(public_project.namespace, public_project)
hasnot_topmenuitem("New issue")
end
scenario 'public project has no New merge request menu item' do
visit namespace_project_path(public_project.namespace, public_project)
hasnot_topmenuitem("New merge request")
end
scenario 'public project has no New project snippet menu item' do
visit namespace_project_path(public_project.namespace, public_project)
expect(find('.header-new.dropdown')).not_to have_selector('.header-new-project-snippet')
end
scenario 'has no New subgroup menu item' do
visit group_path(group)