mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 11:02:46 +08:00
Fix regression introduced in 8cf0f51eb2
.
This commit is contained in:
parent
21e0b7c818
commit
565fa1f60e
|
@ -30,11 +30,11 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||
end
|
||||
|
||||
def include_enabled_setting?
|
||||
object.enabled_site_setting
|
||||
enabled_setting.present?
|
||||
end
|
||||
|
||||
def enabled_setting
|
||||
true
|
||||
object.enabled_site_setting
|
||||
end
|
||||
|
||||
def include_enabled_setting_filter?
|
||||
|
|
14
spec/serializers/admin_plugin_serializer_spec.rb
Normal file
14
spec/serializers/admin_plugin_serializer_spec.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe AdminPluginSerializer do
|
||||
let(:instance) { Plugin::Instance.new }
|
||||
|
||||
subject { described_class.new(instance) }
|
||||
|
||||
describe 'enabled_setting' do
|
||||
it 'should return the right value' do
|
||||
instance.enabled_site_setting('test')
|
||||
expect(subject.enabled_setting).to eq('test')
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user