openstreetmap-website/test/factories/diary_entries.rb
Andy Allan 3b3f328ae4 Rework DiaryEntry and DiaryComment model tests to use factories.
Since the database also contains fixtures from other tests, some
counts are dropped and instead tested for inclusion in the results.
2016-09-07 16:27:21 +01:00

9 lines
210 B
Ruby

FactoryGirl.define do
factory :diary_entry do
sequence(:title) { |n| "Diary entry #{n}" }
sequence(:body) { |n| "This is diary entry #{n}" }
# Fixme requires User Factory
user_id 1
end
end