fix tests in a bunch of places.

This commit is contained in:
fiatjaf
2025-05-17 10:43:30 -03:00
parent df5f42aa5e
commit 81fd999a8d
5 changed files with 20 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ func TestDecryptKeyFromNIPText(t *testing.T) {
ncrypt := "ncryptsec1qgg9947rlpvqu76pj5ecreduf9jxhselq2nae2kghhvd5g7dgjtcxfqtd67p9m0w57lspw8gsq6yphnm8623nsl8xn9j4jdzz84zm3frztj3z7s35vpzmqf6ksu8r89qk5z2zxfmu5gv8th8wclt0h4p"
secretKey, err := Decrypt(ncrypt, "nostr")
assert.NoError(t, err)
assert.Equal(t, "3501454135014541350145413501453fefb02227e449e57cf4d3a3ce05378683", secretKey)
assert.Equal(t, nostr.MustSecretKeyFromHex("3501454135014541350145413501453fefb02227e449e57cf4d3a3ce05378683"), secretKey)
}
func TestEncryptAndDecrypt(t *testing.T) {
@@ -44,7 +44,7 @@ func TestEncryptAndDecrypt(t *testing.T) {
secretKey, err := Decrypt(bech32code, f.password)
assert.NoError(t, err)
assert.Equal(t, f.secretkey, secretKey)
assert.Equal(t, sk, secretKey)
}
}