Skip to content

Commit e79ad71

Browse files
committed
spec/compat_socket_spec.lua: Fix argument order to get correct error message on failure
Thanks @RyanSquared
1 parent 0b54603 commit e79ad71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/compat_socket_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe("http.compat.socket module", function()
88
-- in the luasocket example they use 'wrong.host', but 'host' is now a valid TLD.
99
-- use 'wrong.invalid' instead for this test.
1010
local r, e = http.request("http://wrong.invalid/")
11-
assert.same(r, nil)
11+
assert.same(nil, r)
1212
-- in luasocket, the error is documented as "host not found", but we allow something else
1313
assert.same("string", type(e))
1414
end)

0 commit comments

Comments
 (0)