Update spec/fabricators/extend_topic_fabricator.rb

Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
This commit is contained in:
Linca 2024-09-10 14:26:11 +08:00 committed by GitHub
parent 2c0aff5a21
commit 1a07c87e71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ Fabricator(:custom_topic, from: :topic) do
transient :custom_topic_name
transient :value
after_create do |top, transients|
if (transients[:custom_topic_name] == DiscourseSolved::ACCEPTED_ANSWER_POST_ID_CUSTOM_FIELD)
if transients[:custom_topic_name] == DiscourseSolved::ACCEPTED_ANSWER_POST_ID_CUSTOM_FIELD
post = Fabricate(:post)
Fabricate(:solution, topic_id: top.id, answer_post_id: post.id)
end