Use HTTP body instead of header for setting flows run state

This commit is contained in:
Steve-Mcl
2022-06-27 18:03:14 +01:00
parent 6b6004ee70
commit 2f1f587c50
3 changed files with 4 additions and 7 deletions

View File

@@ -254,7 +254,7 @@ describe("api/admin/flows", function() {
request(app)
.post('/flows/state')
.set('Accept', 'application/json')
.set('Node-RED-Flow-Run-State-Change', 'stop')
.send({state:'stop'})
.expect(200)
.end(function (err, res) {
if (err) {
@@ -295,7 +295,7 @@ describe("api/admin/flows", function() {
request(app)
.post('/flows/state')
.set('Accept', 'application/json')
.set('Node-RED-Flow-Run-State-Change', 'bad-state')
.send({state:'bad-state'})
.expect(400)
.end(function(err,res) {
if (err) {