mirror of
https://github.com/fiatjaf/nak.git
synced 2026-10-05 15:18:23 +00:00
fix a test that depended on the old hardcoded 01 key.
This commit is contained in:
+7
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user