discourse/spec/fabricators/notification_fabricator.rb

19 lines
558 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08:00
Fabricator(:notification) do
2013-03-01 20:07:44 +08:00
notification_type Notification.types[:mentioned]
2013-02-06 03:16:51 +08:00
data '{"poison":"ivy","killer":"croc"}'
user
topic {|attrs| Fabricate(:topic, user: attrs[:user] ) }
end
Fabricator(:quote_notification, from: :notification) do
2013-03-01 20:07:44 +08:00
notification_type Notification.types[:quoted]
2013-02-06 03:16:51 +08:00
user
topic {|attrs| Fabricate(:topic, user: attrs[:user] ) }
end
Fabricator(:private_message_notification, from: :notification) do
2013-03-01 20:07:44 +08:00
notification_type Notification.types[:private_message]
2013-02-06 03:16:51 +08:00
user
topic {|attrs| Fabricate(:topic, user: attrs[:user] ) }
end