Skip to content
Browse files

Add test cases.

  • Loading branch information...
1 parent a8696ea commit dbf4af6fbbf7b273aff5ee80b9ce37c2a669c609 @jaredhanson committed Nov 3, 2011
Showing with 39 additions and 0 deletions.
  1. +15 −0 test/index-test.js
  2. +24 −0 test/strategy-test.js
View
15 test/index-test.js
@@ -0,0 +1,15 @@
+var vows = require('vows');
+var assert = require('assert');
+var util = require('util');
+var google = require('passport-google');
+
+
+vows.describe('passport-google').addBatch({
+
+ 'module': {
+ 'should report a version': function (x) {
+ assert.isString(google.version);
+ },
+ },
+
+}).export(module);
View
24 test/strategy-test.js
@@ -0,0 +1,24 @@
+var vows = require('vows');
+var assert = require('assert');
+var util = require('util');
+var GoogleStrategy = require('passport-google/strategy');
+
+
+vows.describe('GoogleStrategy').addBatch({
+
+ 'strategy': {
+ topic: function() {
+ return new GoogleStrategy({ returnURL: 'https://www.example.com/auth/google/return' },
+ function() {}
+ );
+ },
+
+ 'should be named google': function (strategy) {
+ assert.equal(strategy.name, 'google');
+ },
+ 'should have correct provider URL': function (strategy) {
+ assert.equal(strategy._providerURL, 'https://www.google.com/accounts/o8/id');
+ },
+ },
+
+}).export(module);

0 comments on commit dbf4af6

Please sign in to comment.
Something went wrong with that request. Please try again.