context'when user is not a member of the project'do
it_behaves_like'empty wiki message',issuable: true,expect_button: false
end
it'shows empty state without "Suggest wiki improvement" button'do
visitwiki_path(wiki)
context'when user is a member of the project'do
beforedo
project.add_guest(auditor)
end
expect(page).tohave_content('This project has no wiki pages')
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.')
expect(page).not_tohave_link('Suggest wiki improvement')
it_behaves_like'empty wiki message',issuable: true,expect_button: true