Skip to content

Commit

Permalink
test of index page with soda
Browse files Browse the repository at this point in the history
  • Loading branch information
jchris committed Nov 8, 2010
1 parent 5bf586c commit 6895666
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions node/browser_test.js
@@ -0,0 +1,29 @@
var soda = require('soda')
, assert = require('assert');

var browser = soda.createClient({
host: 'localhost'
, port: 4444
, url: 'http://localhost:5984/'
, browser: 'firefox'
});

browser.on('command', function(cmd, args){
console.log(' \x1b[33m%s\x1b[0m: %s', cmd, args.join(', '));
});

browser
.chain
.session()
.open('/pages/_design/pages/_rewrite/page/index')
.getTitle(function(title){
assert.ok(~title.indexOf('Pages'), 'Title did not match, was '+title);
})
.testComplete()
.end(function(err){
if (err) {
console.log('err', err)
// throw err;
}
console.log('done');
});

0 comments on commit 6895666

Please sign in to comment.