Tests: Add unit tests for internal/entity

This commit is contained in:
graciousgrey 2023-06-26 15:55:05 +02:00
parent 43e98cc687
commit 186d1f26e7

View file

@ -159,6 +159,11 @@ func TestPassword_Cost(t *testing.T) {
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) {