Permalink
Browse files

add request(url) test. Closes #33

  • Loading branch information...
tj committed Dec 28, 2012
1 parent 85150ca commit 2c66d3113183db163f6d280f22ed35d24a90e0f4
Showing with 17 additions and 0 deletions.
  1. +17 −0 test/supertest.js
View
@@ -5,6 +5,23 @@ var request = require('..')
, path = require('path')
, express = require('express');
+describe('request(url)', function(){
+ it('should be supported', function(done){
+ var app = express();
+
+ app.get('/', function(req, res){
+ res.send('hello');
+ });
+
+ var s = app.listen(function(){
+ var url = 'http://localhost:' + s.address().port;
+ request(url)
+ .get('/')
+ .expect("hello", done);
+ });
+ })
+})
+
describe('request(app)', function(){
it('should fire up the app on an ephemeral port', function(done){
var app = express();

0 comments on commit 2c66d31

Please sign in to comment.