Remove I18n keys in request specs

This commit is contained in:
cyrillefr
2023-02-15 10:43:03 +01:00
parent b3ad5aeaca
commit cc0b23c0bd
2 changed files with 3 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ describe "checking out an order that initially fails", type: :request do
# Checking out a BogusGateway without a source fails at :payment
# Shipments and payments should then be cleared before rendering checkout
expect(response.status).to be 400
expect(flash[:error]).to eq I18n.t(:payment_processing_failed)
expect(flash[:error]).to eq 'Payment could not be processed, please check the details you entered'
order.reload
expect(order.shipments.count).to be 0
expect(order.payments.count).to be 0

View File

@@ -244,7 +244,8 @@ describe "checking out an order with a Stripe SCA payment method", type: :reques
expect(response.status).to be 400
expect(json_response["flash"]["error"])
.to eq(I18n.t(:spree_gateway_error_flash_for_checkout, error: 'customer-store-failure'))
.to eq(format("There was a problem with your payment information: %s",
'customer-store-failure'))
expect(order.payments.completed.count).to be 0
end
end