Browse files

Add test for virtual host functionality

  • Loading branch information...
1 parent 3f729f0 commit 3418b9ed0c2fb5abcc8afd9b582751bd640580a7 @mhansen committed Jun 16, 2010
Showing with 16 additions and 0 deletions.
  1. +1 −0 tests/fixtures/examplevirtualhost.com/index.html
  2. +15 −0 tests/test-vhost.js
View
1 tests/fixtures/examplevirtualhost.com/index.html
@@ -0,0 +1 @@
+This is a virtual host root
View
15 tests/test-vhost.js
@@ -0,0 +1,15 @@
+require('./common');
+
+var host = 'examplevirtualhost.com';
+
+exports['a request to the root of a vhost is routed to the right directory']=
+function(test) {
+ antinode.start(settings, function() {
+ test_http(test, {'method':'GET','pathname':'/','headers':{'host':host}},
+ {'statusCode':200, 'body':'This is a virtual host root\n'},
+ function() {
+ antinode.stop();
+ test.done();
+ });
+ });
+};

0 comments on commit 3418b9e

Please sign in to comment.