Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
FBGraph only on server
Browse files Browse the repository at this point in the history
  • Loading branch information
stevezhu committed Sep 1, 2014
1 parent 5b18388 commit 67d27a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Npm.depends({'fbgraph': '0.2.11'});

Package.describe({
summary: "Node.js module to access the Facebook graph api.",
version: "1.0.0",
version: "1.0.1",
git: "https://github.com/stevezhu/meteor-fbgraph.git"
});

Expand All @@ -11,8 +11,8 @@ Package.onUse(function(api) {

api.use('meteorhacks:[email protected]');

api.addFiles('fbgraph.js');
api.export('FBGraph');
api.addFiles('fbgraph.js', 'server');
api.export('FBGraph', 'server');
});

Package.onTest(function(api) {
Expand Down
8 changes: 7 additions & 1 deletion tests/fbgraph_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ var app = {
secret: 'f3fcf473f5a416a6b11a88c558241754'
};

if (Meteor.isClient) {
Tinytest.add("FBGraph - Undefined on client", function(test) {
test.equal(typeof FBGraph, "undefined", "Expected FBGraph to be undefined on client");
});
}

if (Meteor.isServer) {
Tinytest.add("FBGraph - ServiceConfiguration", function(test) {
ServiceConfiguration.configurations.remove({
Expand All @@ -16,6 +22,6 @@ if (Meteor.isServer) {
var friends = FBGraph.getFriends(1406755872880114, {
access_token: app.appId + '|' + app.secret
});
test.equal(3, friends.length, "Expected there to be 3 friends");
test.equal(friends.length, 3, "Expected there to be 3 friends");
});
}

0 comments on commit 67d27a5

Please sign in to comment.