Skip to content

Instantly share code, notes, and snippets.

@victorjonsson
Created July 19, 2012 16:43
Show Gist options
  • Save victorjonsson/3145198 to your computer and use it in GitHub Desktop.
Save victorjonsson/3145198 to your computer and use it in GitHub Desktop.
Dokimon test example 2
var dokimon = require('dokimon'),
assert = require('assert');
var checkHomepage = new dokimon.Test(
'HomePageIsRunning'...
);
var checkSiteSearch = new dokimon.TestPostForm(
'SearchIsWorking',
{
url : '/search/',
write : {s : 'hockey', sortby : 'date', sortorder : 'desc'}
},
function(res, body) {
assert.equal(res.statusCode, 200, 'Search is down');
// and some other assertions that validates expected search result
}
);
module.exports = [checkHomepage,checkSiteSearch];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment