mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
add test for invalid subdomain requests
This commit is contained in:
@@ -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