Commit a0cd769e authored by a_luna's avatar a_luna

Address code review comments

- Improve variable name
- Add Changelog
- Remove unnecessary let_it_be
parent e54ac90d
......@@ -39,8 +39,8 @@ class SnippetBlobPresenter < BlobPresenter
end
def renderer
proxy = Warden::Proxy.new({}, Warden::Manager.new({})).tap do |i|
i.set_user(current_user, scope: :user)
proxy = Warden::Proxy.new({}, Warden::Manager.new({})).tap do |proxy_instance|
proxy_instance.set_user(current_user, scope: :user)
end
ApplicationController.renderer.new('warden' => proxy)
......
---
title: Fix snippet blob viewers for rich and plain data
merge_request: 25945
author:
type: fixed
......@@ -4,8 +4,6 @@ require 'spec_helper'
describe SnippetBlobPresenter do
describe '#rich_data' do
let_it_be(:snippet) { create(:personal_snippet) }
before do
allow_next_instance_of(described_class) do |instance|
allow(instance).to receive(:current_user).and_return(nil)
......
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