Skip to content

Commit

Permalink
Added contact page test (using zombie.js)
Browse files Browse the repository at this point in the history
  • Loading branch information
sahat committed Feb 28, 2014
1 parent 8f4aeae commit 2728e50
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/contact_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
var chai = require('chai');
var should = chai.should();
var app = require('../app.js');
var Browser = require('zombie');
var browser = new Browser({ site: 'http://localhost:3000' });


describe('GET /contact', function() {

it('should refuse partial form submissions', function(done) {
browser.visit('/contact', function() {
browser
.fill('name', 'Clementine')
.fill('message', 'The Walking Dead')
.pressButton('Send', function() {
browser.success.should.be.true;
should.exist(browser.query('.alert-danger'));
done();
});
});
});
});

0 comments on commit 2728e50

Please sign in to comment.