test/dummy/db/seed.rb in query_report-1.0.2 vs test/dummy/db/seed.rb in query_report-1.0.3
- old
+ new
@@ -1,15 +1,10 @@
User.scoped.destroy_all
Invoice.scoped.destroy_all
-users = []
-users << User.create(first_name: 'A.K.M.', last_name: 'Ashrafuzzaman', email: 'ashraf@gmail.com')
-users << User.create(first_name: 'A.K.M.', last_name: 'Zahiduzzaman', email: 'zahid@gmail.com')
-users << User.create(first_name: 'Sharmin', last_name: 'Sultana', email: 'sharmin@gmail.com')
-
1.upto(200) do |i|
total_paid = 100 + Random.rand(100)
total_charged = 100 + Random.rand(100)
invoiced_on = Random.rand(30).days.ago
Invoice.create!(title: "Invoice ##{i}", total_paid: total_paid, total_charged: total_charged, invoiced_on: invoiced_on,
- paid: total_paid >= total_charged, received_by_id: users[Random.rand(3)].id)
+ paid: total_paid >= total_charged)
end
\ No newline at end of file