Tests: Add unit tests for internal/entity
This commit is contained in:
parent
43e98cc687
commit
186d1f26e7
1 changed files with 5 additions and 0 deletions
|
@ -159,6 +159,11 @@ func TestPassword_Cost(t *testing.T) {
|
||||||
assert.Equal(t, 14, cost)
|
assert.Equal(t, 14, cost)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
t.Run("empty password", func(t *testing.T) {
|
||||||
|
p := NewPassword("urrwaxd19ldtz68x", "", false)
|
||||||
|
_, err := p.Cost()
|
||||||
|
assert.Error(t, err)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPassword_String(t *testing.T) {
|
func TestPassword_String(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue