demarches-normaliennes/spec/factories/feedback.rb

18 lines
339 B
Ruby
Raw Normal View History

2018-08-08 17:37:41 +02:00
FactoryBot.define do
factory :feedback do
2018-09-04 16:46:48 +02:00
rating { Feedback.ratings.fetch(:happy) }
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
2018-08-08 17:37:41 +02:00
end
end