Use Stripe payment link id for contribution URL

Agent-Logs-Url: https://github.com/we-promise/sure/sessions/efba0c75-5f82-41a1-b618-532d38e222da

Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-04-04 12:31:54 +00:00
committed by GitHub
parent 6378170d5a
commit e0d2150e2d
7 changed files with 50 additions and 18 deletions

View File

@@ -15,12 +15,15 @@ class Settings::PaymentsControllerTest < ActionDispatch::IntegrationTest
test "shows payment settings when family has stripe_customer_id" do
@family.update!(stripe_customer_id: "cus_test123")
stripe = mock
stripe.expects(:payment_link_url).returns("https://buy.stripe.com/test_payment_link")
Provider::Registry.stubs(:get_provider).with(:stripe).returns(stripe)
get settings_payment_path
assert_response :success
assert_select(
"a[href=?]",
Rails.application.config.x.stripe.one_time_contribution_url,
"https://buy.stripe.com/test_payment_link",
text: I18n.t("views.settings.payments.show.one_time_contribution_link_text")
)
end