mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-09 23:15:58 -05:00
Move theme-related helper methods out of controller (#37807)
This commit is contained in:
@@ -85,20 +85,6 @@ RSpec.describe ApplicationController do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'helper_method :current_theme' do
|
||||
it 'returns "default" when theme wasn\'t changed in admin settings' do
|
||||
allow(Setting).to receive(:default_settings).and_return({ 'theme' => 'default' })
|
||||
|
||||
expect(controller.view_context.current_theme).to eq 'default'
|
||||
end
|
||||
|
||||
it 'returns instances\'s theme when user is not signed in' do
|
||||
allow(Setting).to receive(:[]).with('theme').and_return 'contrast'
|
||||
|
||||
expect(controller.view_context.current_theme).to eq 'contrast'
|
||||
end
|
||||
end
|
||||
|
||||
context 'with ActionController::RoutingError' do
|
||||
subject do
|
||||
routes.draw { get 'routing_error' => 'anonymous#routing_error' }
|
||||
|
||||
Reference in New Issue
Block a user