otwarchive-symphonyarchive/factories/bookmarks.rb

20 lines
502 B
Ruby
Raw Permalink Normal View History

2026-03-11 22:22:11 +00:00
require 'faker'
FactoryBot.define do
factory :bookmark do
bookmarkable_type { "Work" }
bookmarkable_id { FactoryBot.create(:work).id }
pseud_id { FactoryBot.create(:pseud).id }
factory :external_work_bookmark do
bookmarkable_type { "ExternalWork" }
bookmarkable_id { FactoryBot.create(:external_work).id }
end
factory :series_bookmark do
bookmarkable_type { "Series" }
bookmarkable_id { FactoryBot.create(:series_with_a_work).id }
end
end
end