Commit 747e2e09 authored by Markus Koller's avatar Markus Koller

Fix template reference

This view was moved into `app/views/shared` in e7c7beeb, but
I missed one instance.
parent da62cb63
......@@ -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