]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
json: Another test
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 11 Aug 2023 20:47:27 +0000 (14:47 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 11 Aug 2023 20:48:02 +0000 (14:48 -0600)
src/tests/modules/json/json_quote.unlang

index f6f74b84965de9bc356abe2f88c9feda281d17a3..2b140e66b69f388e0d2237bda8f0ed81178861c4 100644 (file)
@@ -32,4 +32,9 @@ if (!(%(json_quote:%{Tmp-String-1}) == 'null')) {
        test_fail
 }
 
+# Test calls in arguments as would be passed to REST module
+if (!(%(test.passthrough:"{\"messages\":[{\"attributes\":{\"acct_status_type\":%(json_quote:%{Acct-Status-Type})}}]}") == '{"messages":[{"attributes":{"acct_status_type":null}}]}')) {
+       test_fail
+}
+
 test_pass