Skip to content

Commit df07bb0

Browse files
Jeremy JudeauxJeremy Judeaux
Jeremy Judeaux
authored and
Jeremy Judeaux
committed
add cookieDomainRewrite disabled test
1 parent b3ab1fb commit df07bb0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/lib-http-proxy-passes-web-outgoing-test.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ describe('lib/http-proxy/passes/web-outgoing.js', function () {
229229
expect(this.res.headers.how).to.eql('are you?');
230230
});
231231

232+
it("does not rewrite domain", function() {
233+
var options = {};
234+
235+
httpProxy.writeHeaders({}, this.res, this.proxyRes, options);
236+
237+
expect(this.res.headers['set-cookie']).to.eql('hello; domain=my.domain; path=/');
238+
});
239+
232240
it("rewrites domain", function() {
233241
var options = {
234242
cookieDomainRewrite: "my.new.domain"
@@ -238,7 +246,7 @@ describe('lib/http-proxy/passes/web-outgoing.js', function () {
238246

239247
expect(this.res.headers['set-cookie']).to.eql('hello; domain=my.new.domain; path=/');
240248
});
241-
249+
242250
it("removes domain", function() {
243251
var options = {
244252
cookieDomainRewrite: ""

0 commit comments

Comments
 (0)