Merge pull request #14106 from mkllnk/taler-fix

Fix specs after taler gem update
This commit is contained in:
Maikel
2026-03-27 10:15:59 +11:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -83,6 +83,10 @@ RSpec.describe Spree::PaymentMethod::Taler do
"taler://refund/backend.demo.taler.net/instances/sandbox/taler-order-8/"
}
before do
stub_request(:post, token_url).to_return(body: { token: "12345" }.to_json)
end
it "starts the refund process" do
order_status = { order_status: "paid" }
stub_request(:get, order_endpoint).to_return(body: order_status.to_json)

View File

@@ -59,8 +59,10 @@ RSpec.describe "Admin -> Order -> Payments" do
amount: "KUDOS:2",
}
}
token_endpoint = "https://taler.example.com/private/token"
order_endpoint = "https://taler.example.com/private/orders/taler-id-1"
refund_endpoint = "https://taler.example.com/private/orders/taler-id-1/refund"
stub_request(:post, token_endpoint).to_return(body: { token: "abc" }.to_json)
stub_request(:get, order_endpoint).to_return(body: order_status.to_json)
stub_request(:post, refund_endpoint).to_return(body: "{}")