Fix some specs, improve config

Allow empty string to unset nostr relay URL config
This commit is contained in:
2024-08-14 13:36:15 +02:00
parent 3284bbf6ca
commit b91d90d75c
3 changed files with 9 additions and 1 deletions

View File

@@ -47,6 +47,10 @@ RSpec.describe "Well-known URLs", type: :request do
end
context "without relay configured" do
before do
Setting.nostr_relay_url = ""
end
it "does not include a recommended relay" do
get "/.well-known/nostr.json?name=bobdylan"
res = JSON.parse(response.body)

View File

@@ -4,6 +4,10 @@ RSpec.describe NostrManager::PublishZapReceipt, type: :model do
let(:user) { create :user, ln_account: "123456abcdef" }
let(:zap) { create :zap, user: user }
before do
Setting.nostr_relay_url = ""
end
describe "Default/delayed execution" do
it "publishes zap receipts to all requested relays" do
expect(NostrPublishEventJob).to receive(:perform_later)