Commit 6cd1672b authored by François Perrad's avatar François Perrad

fix for Lua 5.2

parent 3fcc5965
......@@ -98,7 +98,7 @@ local function convert (doc)
local function walk (resource, required_prm, optional_prm)
for _, _resource in ipairs(resource or {}) do
local required_params, optional_params = get_params(params, required_prm, optional_prm)
local required_params, optional_params = get_params({}, required_prm, optional_prm)
walk(_resource.resource, required_params, optional_params)
populate(_resource.method, _resource.path, required_params, optional_params)
end
......
......@@ -6,7 +6,7 @@ if not pcall(require, 'lxp.lom') then
skip_all 'no xml'
end
plan(8)
plan(12)
local m = require 'Spore.WADL'
type_ok( m, 'table', "Spore.WADL" )
......@@ -37,3 +37,7 @@ type_ok( meth, 'table' )
is( meth.base_url, 'http://services.org:9999/restapi/' )
is( meth.path, 'show' )
is( meth.method, 'GET' )
is( #meth.required_params, 1 )
is( meth.required_params[1], 'user' )
is( #meth.optional_params, 1 )
is( meth.optional_params[1], 'border' )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment