Add missing maxctrl test cases

Code coverage revealed that some parts of the code could be easily
tested. Added these missing test cases and removed some dead code.
This commit is contained in:
Markus Mäkelä
2020-03-05 10:16:17 +02:00
parent 68c070c2c4
commit 5b45796da4
7 changed files with 111 additions and 21 deletions

View File

@ -303,14 +303,6 @@ module.exports = function() {
// Perform a PATCH on a resource
this.updateValue = function(host, resource, key, value) {
var body = {}
// Convert string booleans into JSON booleans
if (value == "true") {
value = true
} else if (value == "false") {
value = false
}
_.set(body, key, value)
return doRequest(host, resource, null, { method: 'PATCH', body: body })
}