|
|
|
|
@ -152,7 +152,7 @@ defmodule GcIndexRelay.Nostr.PubEventTest do
@@ -152,7 +152,7 @@ defmodule GcIndexRelay.Nostr.PubEventTest do
|
|
|
|
|
pub_event = valid_pub_event_fixture() |
|
|
|
|
invalid = %{pub_event | id: String.duplicate("zz", 32)} |
|
|
|
|
|
|
|
|
|
assert_raise BadStructError, fn -> |
|
|
|
|
assert_raise MatchError, fn -> |
|
|
|
|
PubEvent.to_db(invalid) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
@ -161,7 +161,7 @@ defmodule GcIndexRelay.Nostr.PubEventTest do
@@ -161,7 +161,7 @@ defmodule GcIndexRelay.Nostr.PubEventTest do
|
|
|
|
|
pub_event = valid_pub_event_fixture() |
|
|
|
|
invalid = %{pub_event | pubkey: String.duplicate("zz", 32)} |
|
|
|
|
|
|
|
|
|
assert_raise BadStructError, fn -> |
|
|
|
|
assert_raise MatchError, fn -> |
|
|
|
|
PubEvent.to_db(invalid) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
@ -170,7 +170,7 @@ defmodule GcIndexRelay.Nostr.PubEventTest do
@@ -170,7 +170,7 @@ defmodule GcIndexRelay.Nostr.PubEventTest do
|
|
|
|
|
pub_event = valid_pub_event_fixture() |
|
|
|
|
invalid = %{pub_event | sig: String.duplicate("zz", 64)} |
|
|
|
|
|
|
|
|
|
assert_raise BadStructError, fn -> |
|
|
|
|
assert_raise MatchError, fn -> |
|
|
|
|
PubEvent.to_db(invalid) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|