throw an error when "setHeader" is used to add a custom cookie header

This commit is contained in:
Sefa Ilkimen
2017-11-24 19:14:14 +01:00
parent d34196ff4e
commit 01c43c4e29
2 changed files with 14 additions and 2 deletions
+4
View File
@@ -118,4 +118,8 @@ describe('Advanced HTTP www interface', function() {
http.useBasicAuth('name', 'pass');
http.headers['*'].Authorization.should.equal('Basic bmFtZTpwYXNz');
});
it('throws an Error when you try to add a cookie by using "setHeader" #46', () => {
(function() { http.setHeader('*', 'cookie', 'value') }).should.throw();
});
});