From 1a07c87e7189f0b5e6197cca378a015c160496c6 Mon Sep 17 00:00:00 2001 From: Linca <41134017+Lhcfl@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:26:11 +0800 Subject: [PATCH] Update spec/fabricators/extend_topic_fabricator.rb Co-authored-by: Bianca Nenciu --- spec/fabricators/extend_topic_fabricator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/fabricators/extend_topic_fabricator.rb b/spec/fabricators/extend_topic_fabricator.rb index ca38a27..a26ba84 100644 --- a/spec/fabricators/extend_topic_fabricator.rb +++ b/spec/fabricators/extend_topic_fabricator.rb @@ -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