File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,12 @@ func Test{{#lambda.titlecase}}{{clientPrefix}}{{testType}}{{/lambda.titlecase}}{
75
75
require.JSONEq(t, `{ {{match.parameters} }}`, string(rawBody))
76
76
{ {/matchIsJSON} }
77
77
{ {^matchIsJSON} }
78
+ { {#matchIsNull} }
79
+ require.Nil(t, res)
80
+ { {/matchIsNull} }
81
+ { {^matchIsNull} }
78
82
require.Equal(t, `{ {{match} }}`, res)
83
+ { {/matchIsNull} }
79
84
{ {/matchIsJSON} }
80
85
{ {/testResponse} }
81
86
{ {/match} }
Original file line number Diff line number Diff line change @@ -62,7 +62,12 @@ class {{clientPrefix}}Test {
62
62
assertEquals("{ {#lambda.escapeQuotes} }{ {{match.parameters} }}{ {/lambda.escapeQuotes} }", response)
63
63
{ {/matchIsJSON} }
64
64
{ {^matchIsJSON} }
65
+ { {#matchIsNull} }
66
+ assertNull(it)
67
+ { {/matchIsNull} }
68
+ { {^matchIsNull} }
65
69
assertEquals("{ {{match} }}", it)
70
+ { {/matchIsNull} }
66
71
{ {/matchIsJSON} }
67
72
}{ {/testResponse} }
68
73
{ {/match} }
Original file line number Diff line number Diff line change @@ -43,7 +43,12 @@ class TestClient{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}} < Test:
43
43
assert_equal({ {{match.parameters} }}, req.is_a?(Array) ? req.map(& :to_hash) : req.to_hash)
44
44
{ {/matchIsJSON} }
45
45
{ {^matchIsJSON} }
46
+ { {#matchIsNull} }
47
+ assert_nil(req)
48
+ { {/matchIsNull} }
49
+ { {^matchIsNull} }
46
50
assert_equal('{ {{match} }}', req)
51
+ { {/matchIsNull} }
47
52
{ {/matchIsJSON} }
48
53
{ {/testResponse} }
49
54
{ {/match} }
Original file line number Diff line number Diff line change @@ -73,7 +73,12 @@ class {{clientPrefix}}Test extends AnyFunSuite {
73
73
assert(write(res) == "{ {#lambda.escapeQuotes} }{ {{match.parameters} }}{ {/lambda.escapeQuotes} }")
74
74
{ {/matchIsJSON} }
75
75
{ {^matchIsJSON} }
76
+ { {#matchIsNull} }
77
+ assert(res == null)
78
+ { {/matchIsNull} }
79
+ { {^matchIsNull} }
76
80
assert(res == "{ {{match} }}")
81
+ { {/matchIsNull} }
77
82
{ {/matchIsJSON} }
78
83
{ {/testResponse} }
79
84
{ {/match} }
You can’t perform that action at this time.
0 commit comments