adding missing names to the test cases

pull/85/head
Matthijs van Henten 2015-04-15 12:03:09 +00:00
rodzic dc42ba890d
commit bb6cb22cdc
1 zmienionych plików z 6 dodań i 4 usunięć

10
node_modules/frontdoor/lib/api_test.js wygenerowano vendored
Wyświetl plik

@ -5,7 +5,7 @@
require("amd-loader"); require("amd-loader");
var assert = require("assert"); var assert = require("assert-diff");
var sinon = require("sinon"); var sinon = require("sinon");
var Api = require("./api"); var Api = require("./api");
@ -405,16 +405,19 @@ module.exports = {
"method": "put", "method": "put",
"params": { "params": {
"id": { "id": {
"name": "id",
"type": "/\\d{4}/", "type": "/\\d{4}/",
"source": "url", "source": "url",
"optional": false "optional": false
}, },
"name": { "name": {
"name": "name",
"type": "string", "type": "string",
"source": "body", "source": "body",
"optional": false "optional": false
}, },
"age": { "age": {
"name": "age",
"type": "int", "type": "int",
"source": "body", "source": "body",
"optional": true "optional": true
@ -426,6 +429,7 @@ module.exports = {
"method": "delete", "method": "delete",
"params": { "params": {
"id": { "id": {
"name": "id",
"type": "string", "type": "string",
"source": "url", "source": "url",
"optional": false "optional": false
@ -436,8 +440,8 @@ module.exports = {
} }
] ]
}; };
assert.equal(JSON.stringify(description), JSON.stringify(expected));
assert.equal(JSON.stringify(description), JSON.stringify(expected));
}, },
"test handler with two arguments should be treated as function(params, callback) {}": function() { "test handler with two arguments should be treated as function(params, callback) {}": function() {
@ -469,8 +473,6 @@ module.exports = {
assert(called); assert(called);
} }
// test checks can be async
// fromString, fromJson
}; };
!module.parent && require("asyncjs").test.testcase(module.exports).exec(); !module.parent && require("asyncjs").test.testcase(module.exports).exec();