Permalink
Browse files

Added more spec for facebook api.

  • Loading branch information...
1 parent 408031d commit 5263b40deed9f897e162b783f9da6f54b9470ad0 @llun committed Mar 31, 2013
Showing with 30 additions and 1 deletion.
  1. +30 −1 spec/remote/test_facebook.js
@@ -1,8 +1,14 @@
var _ = require('underscore'),
+ chai = require('chai'),
should = require('chai').should(),
+ chai_as_promised = require('chai-as-promised'),
+ mocha_as_promised = require('mocha-as-promised'),
util = require('util'),
q = require('q');
+chai.use(chai_as_promised);
+mocha_as_promised();
+
var Facebook = require('../../services').facebook;
describe('facebook', function () {
@@ -65,7 +71,30 @@ describe('facebook', function () {
describe ('#posts', function () {
- it ('should return posts since the beginning of time', function () {
+ it ('should return first page posts since the beginning of time', function () {
+ return q.nfcall(facebook.posts)
+ .then(function (posts) {
+
+ });
+
+ });
+
+ it ('should return second page posts since the beginning of time', function () {
+ // Have to test which is second page numeric, 1 or 2
+ return q.nfcall(facebook.posts, 1)
+ .then(function (posts) {
+
+ });
+ });
+
+ it ('should return posts since the specific time', function () {
+
+ // timestamp will changed later, have to manipulate data in facebook first?
+ var timestamp = new Date().getTime();
+ return q.nfcall(facebook.posts, 0, timestamp)
+ .then(function (posts) {
+
+ });
});

0 comments on commit 5263b40

Please sign in to comment.