mirror of
https://github.com/bitinflow/server.git
synced 2026-11-01 05:09:10 +00:00
add test for invalid subdomain requests
This commit is contained in:
1 parent
dd6d04c2cf
commit
8abb4f395f
3 files changed
+17
-5
No files matched your search
@@ -91,6 +91,19 @@ test('request specific domain', function(done) {
|
||||
});
|
||||
});
|
||||
|
||||
test('request domain that is too long', function(done) {
|
||||
var opt = {
|
||||
host: 'http://localhost:' + lt_server_port,
|
||||
subdomain: 'thisdomainisoutsidethesizeofwhatweallow'
|
||||
};
|
||||
|
||||
localtunnel(test._fake_port, opt, function(err, tunnel) {
|
||||
assert(err);
|
||||
assert.equal(err.message, 'Invalid subdomain. Subdomains must be between 4 and 20 alphanumeric characters.');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('shutdown', function() {
|
||||
localtunnel_server.close();
|
||||
});
|
||||
Reference in new issue
Block a user