mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 15:54:00 +08:00
FIX: Fix failing spec caused by unpersisted user instance (#19288)
Active Record's `to_sql` method seems to return an empty string instead of the expected SQL query when called on a query involving an unpersisted model instance. This replaces the admin `user` used in the specs with a persisted instance.
This commit is contained in:
parent
1fbcf57767
commit
a65c3ba079
|
@ -953,7 +953,7 @@ describe Search do
|
|||
context 'post searching' do
|
||||
before do
|
||||
SiteSetting.tagging_enabled = true
|
||||
DiscourseTagging.tag_topic_by_names(post.topic, Guardian.new(Fabricate.build(:admin)), [tag.name, uppercase_tag.name])
|
||||
DiscourseTagging.tag_topic_by_names(post.topic, Guardian.new(admin), [tag.name, uppercase_tag.name])
|
||||
post.topic.save
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user