Add some posting to rake db:seed

This commit is contained in:
Raphael Sofaer 2011-04-07 15:00:04 -07:00
parent 51b3cd9c77
commit 883ff63ec9

View file

@ -25,3 +25,18 @@ eve.person.profile.update_attributes(:first_name => "Eve", :last_name => "Doe")
connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
require 'spec/support/fake_resque'
require 'spec/support/fake_redis'
require 'spec/support/user_methods'
time_interval = 1000
(1..25).each do |n|
[alice, bob, eve].each do |u|
post = u.post :status_message, :text => "#{u.username} - #{n}", :to => u.aspects.first.id
post.created_at = post.created_at + time_interval
post.updated_at = post.updated_at + time_interval
post.save
time_interval += 1000
end
end