Files
danbooru/test/factories/user_feedback.rb
evazion b4ce2d83a6 models: remove belongs_to_creator macro.
The belongs_to_creator macro was used to initialize the creator_id field
to the CurrentUser. This made tests complicated because it meant you had
to create and set the current user every time you wanted to create an
object, when lead to the current user being set over and over again. It
also meant you had to constantly be aware of what the CurrentUser was in
many different contexts, which was often confusing. Setting creators
explicitly simplifies everything greatly.
2020-01-21 00:09:38 -06:00

9 lines
175 B
Ruby

FactoryBot.define do
factory(:user_feedback) do
creator factory: :builder_user
user
category { "positive" }
body { FFaker::Lorem.words.join(" ") }
end
end