mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 02:25:37 +08:00
DEV: Make all admins TL4 in tests (#25435)
Make admins TL4 by default in tests, foregoing the need to call refresh_auto_groups on them.
This commit is contained in:
@ -36,7 +36,7 @@ RSpec.describe TopicViewDetailsSerializer do
|
||||
before { SiteSetting.can_permanently_delete = true }
|
||||
|
||||
it "is true for admins" do
|
||||
admin = Fabricate(:admin, refresh_auto_groups: true)
|
||||
admin = Fabricate(:admin)
|
||||
|
||||
serializer = described_class.new(TopicView.new(post.topic, admin), scope: Guardian.new(admin))
|
||||
expect(serializer.as_json.dig(:topic_view_details, :can_permanently_delete)).to eq(true)
|
||||
|
@ -14,7 +14,7 @@ RSpec.describe TopicViewSerializer do
|
||||
fab!(:topic)
|
||||
fab!(:user) { Fabricate(:user, refresh_auto_groups: true) }
|
||||
fab!(:user_2) { Fabricate(:user) }
|
||||
fab!(:admin) { Fabricate(:admin, refresh_auto_groups: true) }
|
||||
fab!(:admin)
|
||||
|
||||
describe "#featured_link and #featured_link_root_domain" do
|
||||
fab!(:featured_link) { "http://meta.discourse.org" }
|
||||
|
Reference in New Issue
Block a user