Commit 3e69408e authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-wiki-update-empty-state' into 'master'

Fix template reference

See merge request gitlab-org/gitlab!34384
parents 2a32e31c 747e2e09
......@@ -78,7 +78,7 @@ module WikiActions
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def update
return render('empty') unless can?(current_user, :create_wiki, container)
return render('shared/wikis/empty') unless can?(current_user, :create_wiki, container)
@page = WikiPages::UpdateService.new(container: container, current_user: current_user, params: wiki_params).execute(page)
......
......@@ -282,6 +282,18 @@ RSpec.shared_examples 'wiki controller actions' do
expect(wiki_page.content).to eq new_content
end
end
context 'when user does not have edit permissions' do
before do
sign_out(:user)
end
it 'renders the empty state' do
subject
expect(response).to render_template('shared/wikis/empty')
end
end
end
def redirect_to_wiki(wiki, page)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment