Fix XMPP from-address config not being used
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 3s

This commit is contained in:
Râu Cao
2023-09-27 12:39:35 +02:00
parent 7a5fd46835
commit e9c4929726
2 changed files with 3 additions and 2 deletions

View File

@@ -68,6 +68,7 @@ RSpec.describe "Webhooks", type: :request do
context "notification preference set to 'xmpp'" do
before do
Setting.xmpp_notifications_from_address = "botka@kosmos.org"
user.update! preferences: { lightning_notify_sats_received: "xmpp" }
post "/webhooks/lndhub", params: payload.to_json
end
@@ -78,7 +79,7 @@ RSpec.describe "Webhooks", type: :request do
msg = enqueued_jobs.first["arguments"].first
expect(msg["type"]).to eq("normal")
expect(msg["from"]).to eq("kosmos.org")
expect(msg["from"]).to eq("botka@kosmos.org")
expect(msg["to"]).to eq(user.address)
expect(msg["subject"]).to eq("Sats received!")
expect(msg["body"]).to match(/^12,300 sats received/)