Add a media server list case to the publish request spec

Mirrors the relay list coverage for kind 10063.
This commit is contained in:
raucao committed 2026-11-18 21:29:58 +04:00
1 parent 96f735cbc0
commit 4ed88d1e78
1 file changed
+15
@@ -81,6 +81,21 @@ RSpec.describe "Settings::NostrEvents", type: :request do
end
end
it "accepts a media server list event" do
event = signed_event(
kind: NostrManagerService::MEDIA_SERVER_LIST_KIND,
tags: [["server", "https://blossom.example.com"]]
)
expect(NostrPublishUserEventJob).to receive(:perform_later) do |args|
expect(args[:event]["kind"]).to eq(NostrManagerService::MEDIA_SERVER_LIST_KIND)
expect(args[:event]["tags"]).to eq([["server", "https://blossom.example.com"]])
end
post_signed_event(event)
expect(response).to have_http_status(:ok)
end
context "when the account has no public key" do
before { allow_any_instance_of(User).to receive(:nostr_pubkey).and_return(nil) }