Browse Source

Commit 12-1: Added enough posts that pagination is necessary.

Frederic G. MARAND 9 năm trước cách đây
mục cha
commit
876f43b300
1 tập tin đã thay đổi với 11 bổ sung1 xóa
  1. 11 1
      server/fixtures.js

+ 11 - 1
server/fixtures.js

@@ -55,7 +55,17 @@ if (Posts.find().count() === 0) {
     submitted: new Date(now - 12 * 3600 * 1000),
     commentsCount: 0
   });
-}
+
+  for (var i = 0; i < 10; i++) {
+    Posts.insert({
+      title: 'Test post #' + i,
+      author: sacha.profile.name,
+      userId: sacha._id,
+      url: 'http://google.com/?q=test-' + i,
+      submitted: new Date(now - i * 3600 * 1000),
+      commentsCount: 0
+    });
+  }}
 else {
   Meteor._debug('Posts collection is not empty');
 }