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