mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge branch 'node-red:master' into master-fixpermission
This commit is contained in:
commit
8b398f49c0
@ -1529,7 +1529,7 @@ describe('HTTP Request Node', function() {
|
|||||||
msg.payload.headers.should.have.property('Content-Type').which.startWith('application/json');
|
msg.payload.headers.should.have.property('Content-Type').which.startWith('application/json');
|
||||||
//msg.dynamicHeaderName should be present in headers with the value of msg.dynamicHeaderValue
|
//msg.dynamicHeaderName should be present in headers with the value of msg.dynamicHeaderValue
|
||||||
msg.payload.headers.should.have.property('dyn-header-name').which.startWith('dyn-header-value');
|
msg.payload.headers.should.have.property('dyn-header-name').which.startWith('dyn-header-value');
|
||||||
//static (custom) header set in Flow UI should be present
|
//static (custom) header set in Flow UI should be present
|
||||||
msg.payload.headers.should.have.property('static-header-name').which.startWith('static-header-value');
|
msg.payload.headers.should.have.property('static-header-name').which.startWith('static-header-value');
|
||||||
//msg.headers['location'] should be deleted because Flow UI "Location" header has a blank value
|
//msg.headers['location'] should be deleted because Flow UI "Location" header has a blank value
|
||||||
//ensures headers with matching characters but different case are eliminated
|
//ensures headers with matching characters but different case are eliminated
|
||||||
@ -2281,7 +2281,7 @@ describe('HTTP Request Node', function() {
|
|||||||
let port = testPort++
|
let port = testPort++
|
||||||
|
|
||||||
let server;
|
let server;
|
||||||
|
|
||||||
before(function() {
|
before(function() {
|
||||||
server = net.createServer(function (socket) {
|
server = net.createServer(function (socket) {
|
||||||
socket.write("HTTP/1.0 200\nContent-Type: text/plain\n\nHelloWorld")
|
socket.write("HTTP/1.0 200\nContent-Type: text/plain\n\nHelloWorld")
|
||||||
@ -2291,7 +2291,7 @@ describe('HTTP Request Node', function() {
|
|||||||
server.listen(port,'127.0.0.1', function(err) {
|
server.listen(port,'127.0.0.1', function(err) {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
after(function() {
|
after(function() {
|
||||||
server.close()
|
server.close()
|
||||||
});
|
});
|
||||||
@ -2322,14 +2322,14 @@ describe('HTTP Request Node', function() {
|
|||||||
var n2 = helper.getNode("n2");
|
var n2 = helper.getNode("n2");
|
||||||
n2.on('input', function(msg) {
|
n2.on('input', function(msg) {
|
||||||
try{
|
try{
|
||||||
msg.payload.should.equal(`RequestError: Parse Error: Missing expected CR after header value : http://localhost:${port}/`)
|
msg.payload.should.match(/RequestError: Parse Error/)
|
||||||
done()
|
done()
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
done(err)
|
done(err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
n1.receive({payload: 'foo'})
|
n1.receive({payload: 'foo'})
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user