Skip to content

Commit

Permalink
Initial addition of facebookSharing to the backpack controller tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
davelester committed Mar 10, 2013
1 parent e79dfe1 commit e0e9708
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/backpack-controller.test.js
Expand Up @@ -92,6 +92,24 @@ test('backpack#settings works', function (t) {
});
t.end();
});

test('backpack#facebookSharing', function (t) {
conmock({
handler: backpack.facebookSharing,
request: {
body: {
accessToken: 'aaBBccDDeFgHiJkLMnOP',
badgeBodyHash: 'sillybadgehash',
userId: 'me',
comment: 'Commenting on my badge so others know how awesome I am!',
fbAutomaticPush: 'checked'
}
}
}, function (err, mock, req) {
if (err) throw err;
t.equal(mock.status, 303);
t.end();
});
});

testUtils.finish(test);

0 comments on commit e0e9708

Please sign in to comment.