Update spec/fabricators/extend_topic_fabricator.rb
Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
This commit is contained in:
parent
2c0aff5a21
commit
1a07c87e71
|
@ -3,7 +3,7 @@ Fabricator(:custom_topic, from: :topic) do
|
||||||
transient :custom_topic_name
|
transient :custom_topic_name
|
||||||
transient :value
|
transient :value
|
||||||
after_create do |top, transients|
|
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)
|
post = Fabricate(:post)
|
||||||
Fabricate(:solution, topic_id: top.id, answer_post_id: post.id)
|
Fabricate(:solution, topic_id: top.id, answer_post_id: post.id)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue