diff options
Diffstat (limited to 'tests/extensions/harness.lua')
| -rw-r--r-- | tests/extensions/harness.lua | 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 6 insertions, 12 deletions
diff --git a/tests/extensions/harness.lua b/tests/extensions/harness.lua index d0299e3..d9318ee 100644 --- a/tests/extensions/harness.lua +++ b/tests/extensions/harness.lua @@ -198,8 +198,7 @@ function harness.stub_auth_modules() new = function(key, algorithm) return { final = function(self, payload) - return fake_digest_bytes(key .. "\1" .. - algorithm .. "\1" .. payload) + return fake_digest_bytes(key .. "\1" .. algorithm .. "\1" .. payload) end, } end, @@ -227,26 +226,21 @@ end function harness.equals(name, got, want) checks = checks + 1 if got ~= want then - fail(name, "wanted " .. tostring(want) .. - "\n got " .. tostring(got)) + fail(name, "wanted " .. tostring(want) .. "\n got " .. tostring(got)) end end function harness.contains(name, haystack, needle) checks = checks + 1 - if type(haystack) ~= "string" - or not haystack:find(needle, 1, true) then - fail(name, "wanted " .. needle .. - "\nwithin " .. tostring(haystack)) + if type(haystack) ~= "string" or not haystack:find(needle, 1, true) then + fail(name, "wanted " .. needle .. "\nwithin " .. tostring(haystack)) end end function harness.excludes(name, haystack, needle) checks = checks + 1 - if type(haystack) ~= "string" - or haystack:find(needle, 1, true) then - fail(name, "did not want " .. needle .. - "\nwithin " .. tostring(haystack)) + if type(haystack) ~= "string" or haystack:find(needle, 1, true) then + fail(name, "did not want " .. needle .. "\nwithin " .. tostring(haystack)) end end |
