* Bump factory_bot_rails from 4.10.0 to 4.11.0 Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases) - [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/master/NEWS) - [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v4.10.0...v4.11.0) Signed-off-by: dependabot[bot] <support@dependabot.com> * Update factories to always use blocks
24 lines
547 B
Ruby
24 lines
547 B
Ruby
FactoryBot.define do
|
|
factory :feedback_message do
|
|
transient do
|
|
reporter_id { 1 }
|
|
end
|
|
|
|
after(:create) do |feedback_message, evaluator|
|
|
feedback_message.update(reporter_id: evaluator.reporter_id)
|
|
end
|
|
end
|
|
|
|
trait :abuse_report do
|
|
feedback_type { "abuse-reports" }
|
|
message { "this is spam" }
|
|
category { "spam" }
|
|
reported_url { "https://dev.to" }
|
|
end
|
|
|
|
trait :bug_report do
|
|
feedback_type { "bug-reports" }
|
|
message { "i clicked something and this happened" }
|
|
category { "bugs" }
|
|
end
|
|
end
|