fix a spec to have built-in roles

pull/5981/head
Wieland Lindenthal 7 years ago committed by Jens Ulferts
parent 071c911f45
commit 3ab14c057d
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 39
      spec/features/projects/projects_index_spec.rb

@ -82,25 +82,26 @@ describe 'Projects index page', type: :feature, js: true, with_settings: { login
# TODO: Fix permission check so that this feature spec passes.
#
# feature 'for project members' do
# let!(:user) do
# FactoryGirl.create(:user,
# member_in_project: development_project,
# member_through_role: developer,
# login: 'nerd',
# firstname: 'Alan',
# lastname: 'Turing')
# end
#
# scenario 'only public project or those the user is member of shall be visible' do
# login_as(user)
# visit projects_path
# expect(page).to have_text(development_project.name)
# expect(page).to have_text(public_project.name)
# expect(page).to_not have_text(project.name)
# end
# pending "Not 'visible' CFs shall only be visible for admins"
# end
feature 'for project members' do
let!(:user) do
FactoryGirl.create(:user,
member_in_project: development_project,
member_through_role: developer,
login: 'nerd',
firstname: 'Alan',
lastname: 'Turing')
end
scenario 'only public project or those the user is member of shall be visible' do
Role.non_member
login_as(user)
visit projects_path
expect(page).to have_text(development_project.name)
expect(page).to have_text(public_project.name)
expect(page).to_not have_text(project.name)
end
pending "Not 'visible' CFs shall only be visible for admins"
end
feature 'for admins' do
scenario 'test that all projects are visible' do

Loading…
Cancel
Save