fix a test that depended on the old hardcoded 01 key.

This commit is contained in:
fiatjaf
2026-08-15 09:17:06 -03:00
parent e2a390fad3
commit 76bc4953c1
+7 -1
View File
@@ -28,7 +28,7 @@ func call(t *testing.T, cmd string) string {
}
func TestEventBasic(t *testing.T) {
output := call(t, "nak event --ts 1699485669")
output := call(t, "nak event --ts 1699485669 --sec 01")
var evt nostr.Event
err := stdjson.Unmarshal([]byte(output), &evt)
@@ -230,6 +230,12 @@ func TestNaturalTimestamps(t *testing.T) {
require.Equal(t, "nn", evt.Content)
}
func TestGroupAdmins(t *testing.T) {
output := call(t, "nak group admins chat.wisp.talk'aw0n6tcl71qa")
require.Contains(t, output, "e2ccf7cf20403f3f2a4a55b328f0de3be38558a7d5f33632fdaaefc726c1c8eb")
}
func TestEventJQ(t *testing.T) {
// default: string results come out JSON-quoted, like plain jq
quoted := call(t, "nak event --ts 1699485669 -c hello --jq .content")