Fix some specs, improve config
Allow empty string to unset nostr relay URL config
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user