Skip to content

Commit

Permalink
Fix ValidateName tests
Browse files Browse the repository at this point in the history
This fixes the tests for the #32 PR, which did not update them to match
the implementation changes.

Signed-off-by: Guillem Jover <gjover@sipwise.com>
  • Loading branch information
guillemj committed Nov 19, 2021
1 parent b4f29f3 commit b45e39d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,13 @@ func TestValidateName(t *testing.T) {
assert.EqualValues(t, "myValidation", vv.Name)
assert.EqualValues(t, "myMessage", vv.message)

// unchanged
// forced
vv = v.ValidateName("myNewName")
assert.EqualValues(t, "myValidation", vv.Name)
assert.EqualValues(t, "myMessage", vv.message)
assert.EqualValues(t, "myNewName.myValidation", vv.Name)
assert.EqualValues(t, "myNewName.myMessage", vv.message)

v.Name = ""
v.message = "myMessage"

// unchanged
vv = v.ValidateName("")
Expand Down

0 comments on commit b45e39d

Please sign in to comment.