Browse files

test of index page with soda

  • Loading branch information...
1 parent 5bf586c commit 68956662dcc3e9bd4855149811f2707c38dddaf2 @jchris jchris committed Nov 7, 2010
Showing with 29 additions and 0 deletions.
  1. +29 −0 node/browser_test.js
View
29 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.