spec/dummy/db/seeds/groups.seeds.rb in message_train-0.1.7 vs spec/dummy/db/seeds/groups.seeds.rb in message_train-0.2.0
- old
+ new
@@ -1,9 +1,36 @@
after :users do
first_user = User.friendly.find('first-user')
+ second_user = User.friendly.find('second-user')
+ third_user = User.friendly.find('third-user')
+ fourth_user = User.friendly.find('fourth-user')
+ unsubscribed_user = User.friendly.find('unsubscribed-user')
first_group = FactoryGirl.create(
:group,
title: 'First Group',
owner: first_user
)
+ fourth_user.add_role(:member, first_group)
+ unsubscribed_user.add_role(:member, first_group)
+
+ membered_group = FactoryGirl.create(
+ :group,
+ title: 'Membered Group',
+ owner: second_user
+ )
+ first_user.add_role(:member, membered_group)
+ unsubscribed_user.add_role(:member, membered_group)
+
+ empty_group = FactoryGirl.create(
+ :group,
+ title: 'Empty Group',
+ owner: first_user
+ )
+
+ unsubscribed_group = FactoryGirl.create(
+ :group,
+ title: 'Unsubscribed Group',
+ owner: second_user
+ )
+ first_user.add_role(:member, unsubscribed_group)
end
\ No newline at end of file