discourse/spec/fabricators/notification_fabricator.rb
2017-07-28 10:20:09 +09:00

19 lines
558 B
Ruby

Fabricator(:notification) do
notification_type Notification.types[:mentioned]
data '{"poison":"ivy","killer":"croc"}'
user
topic { |attrs| Fabricate(:topic, user: attrs[:user]) }
end
Fabricator(:quote_notification, from: :notification) do
notification_type Notification.types[:quoted]
user
topic { |attrs| Fabricate(:topic, user: attrs[:user]) }
end
Fabricator(:private_message_notification, from: :notification) do
notification_type Notification.types[:private_message]
user
topic { |attrs| Fabricate(:topic, user: attrs[:user]) }
end