demarches-normaliennes/spec/factories/feedback.rb
2020-08-18 15:57:36 +02:00

18 lines
361 B
Ruby

FactoryBot.define do
factory :feedback do
rating { Feedback.ratings.fetch(:happy) }
association :user
trait :happy do
rating { Feedback.ratings.fetch(:happy) }
end
trait :neutral do
rating { Feedback.ratings.fetch(:neutral) }
end
trait :unhappy do
rating { Feedback.ratings.fetch(:unhappy) }
end
end
end