Add settled_at to zaps, scope by settlement status
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 4s

This commit is contained in:
2024-06-07 14:53:00 +02:00
parent 8949d76d26
commit 5588e3b3e8
5 changed files with 23 additions and 5 deletions

View File

@@ -167,10 +167,14 @@ RSpec.describe "Webhooks", type: :request do
expect(response).to have_http_status(:ok)
end
it "adds the settlement date/time to the zap record" do
post "/webhooks/lndhub", params: payload.to_json
expect(user.zaps.first.settled_at.to_i).to eq(1673428978)
end
it "creates and adds a zap receipt to the zap record" do
post "/webhooks/lndhub", params: payload.to_json
zap = user.zaps.first
expect(zap.receipt).not_to be_nil
expect(user.zaps.first.receipt).not_to be_nil
end
it "publishes the zap receipt" do