Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorMaxwell Salzberg <maxwell@joindiaspora.com>2011-07-29 00:16:02 +0400
committerMaxwell Salzberg <maxwell@joindiaspora.com>2011-07-29 00:16:43 +0400
commita325970e5dbd647e587f83d7407b2d3472a66d7a (patch)
tree977520c79aff6f104d0a9b7dcde3efa6be0f55d1 /db
parent444231956008fdd33f234e6334d48c4ea3821b70 (diff)
test to make sure mobile site does not 500 with all media types
Diffstat (limited to 'db')
-rw-r--r--db/seeds.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/db/seeds.rb b/db/seeds.rb
index 2d6a6d399..f60329e62 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -48,10 +48,19 @@ 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} - #seeded", :to => u.aspects.first.id
+ if(n%3==1)
+ post = u.post :status_message, :text => "#{u.username} - #{n} - #seeded", :to => u.aspects.first.id
+ elsif(n%3==2)
+ post =u.post(:reshare, :root_guid => Factory(:status_message, :public => true).guid, :to => 'all')
+ else
+ post = Factory(:activity_streams_photo, :public => true, :author => u.person)
+ u.add_to_streams(post, u.aspects)
+ end
+
post.created_at = post.created_at - time_interval
post.updated_at = post.updated_at - time_interval
post.save
time_interval += 1000
end
+ puts "successfully seeded database with bob, alice and eve (password: evankorth)"
end