Software /
code /
prosody
Comparison
spec/util_http_spec.lua @ 13401:626ab0af83af
util.http: Silence strict luacheck warning in tests
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 09 Dec 2023 21:01:49 +0100 |
parent | 13124:f15e23840780 |
comparison
equal
deleted
inserted
replaced
13400:786c7707f306 | 13401:626ab0af83af |
---|---|
39 it("should encode basic data", function() | 39 it("should encode basic data", function() |
40 assert.are.equal(http.formencode({ { name = "one", value = "1"}, { name = "two", value = "2" } }), "one=1&two=2", "Form encoded"); | 40 assert.are.equal(http.formencode({ { name = "one", value = "1"}, { name = "two", value = "2" } }), "one=1&two=2", "Form encoded"); |
41 end); | 41 end); |
42 | 42 |
43 it("should encode special characters with escaping", function() | 43 it("should encode special characters with escaping", function() |
44 -- luacheck: ignore 631 | |
44 assert.are.equal(http.formencode({ { name = "one two", value = "1"}, { name = "two one&", value = "2" } }), "one+two=1&two+one%26=2", "Form encoded"); | 45 assert.are.equal(http.formencode({ { name = "one two", value = "1"}, { name = "two one&", value = "2" } }), "one+two=1&two+one%26=2", "Form encoded"); |
45 end); | 46 end); |
46 end); | 47 end); |
47 | 48 |
48 describe("#formdecode()", function() | 49 describe("#formdecode()", function() |