Skip to content

Commit fda3a01

Browse files
Lucas Vieiraomissis
authored andcommitted
added test
1 parent 2ef44be commit fda3a01

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/validation_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ func TestMaxStringLength(t *testing.T) {
2828
data: `{"myString": "hello"}`,
2929
wantErr: nil,
3030
},
31+
{
32+
desc: "myString too long",
33+
data: `{"myString": "hello world"}`,
34+
wantErr: errors.New("field myString length: must be <= 5"),
35+
},
3136
{
3237
desc: "myString not present",
3338
data: `{}`,

0 commit comments

Comments
 (0)