Add some posting to rake db:seed
This commit is contained in:
parent
51b3cd9c77
commit
883ff63ec9
1 changed files with 15 additions and 0 deletions
15
db/seeds.rb
15
db/seeds.rb
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue