Created
August 1, 2011 02:21
-
-
Save cpsubrian/1117472 to your computer and use it in GitHub Desktop.
Testing FC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
♢ FreedomConnector | |
An unauthenticated visit to the front page | |
✓ should have a status of 200 | |
✓ should have an active logo anchor | |
✓ OK » 2 honored (1.087s) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Tests for FreedomConnector. | |
*/ | |
process.env['NODE_ENV'] = 'test'; | |
var vows = require('vows'), | |
tobi = require('tobi'), | |
should = require('should'); | |
/** | |
* Macros | |
*/ | |
var getUrl = function(url) { | |
return function() { | |
var browser = tobi.createBrowser(80, 'connect.freedomworks.org'); | |
browser.get(url, this.callback.bind(this, null)); | |
} | |
} | |
/** | |
* Tests | |
*/ | |
vows.describe('FreedomConnector').addBatch({ | |
'An unauthenticated visit to the front page': { | |
topic: getUrl('/'), | |
'should have a status of 200': function(_, res, $){ | |
res.should.have.status(200); | |
}, | |
'should have an active logo anchor': function(_, res, $) { | |
$('div.logo').should.have.one('a.active'); | |
}, | |
} | |
}).export(module); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment