it'shows empty state without "Suggest wiki improvement" button'do
context'when user is not a member of the project'do
visitwiki_path(wiki)
it_behaves_like'empty wiki message',issuable: true,expect_button: false
end
expect(page).tohave_content('This project has no wiki pages')
context'when user is a member of the project'do
expect(page).tohave_content('You must be a project member in order to add wiki pages. If you have suggestions for how to improve the wiki for this project, consider opening an issue in the issue tracker.')
beforedo
expect(page).not_tohave_link('Suggest wiki improvement')
project.add_guest(auditor)
end
it_behaves_like'empty wiki message',issuable: true,expect_button: true