12 lines
276 B
Go
12 lines
276 B
Go
|
|
package secretstore
|
||
|
|
|
||
|
|
import "testing"
|
||
|
|
|
||
|
|
func TestCredentialValidateRequiresAllFields(t *testing.T) {
|
||
|
|
cred := Credential{Host: "imap.example.com", Username: "alice"}
|
||
|
|
|
||
|
|
if err := cred.Validate(); err == nil {
|
||
|
|
t.Fatal("expected validation error when password is missing")
|
||
|
|
}
|
||
|
|
}
|