File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -529,3 +529,24 @@ def test_update_payment_link(self):
529529 )
530530 self .assertEqual ("expired" ,result .message ["status" ])
531531
532+ def test_service_name_validation (self ):
533+ """
534+ This test prevents a regression of a bug found in the Adyen Ruby library
535+ where the `service` attribute of the `PaymentsApi` class was being
536+ overridden due to the way Ruby handles open classes.
537+
538+ This test validates that the `service` and `baseUrl` attributes of the
539+ `payments_api` for both `checkout` and `payment` are set correctly and
540+ are not being overridden by ensuring that each service has its own
541+ `PaymentsApi` class in a separate module.
542+ """
543+ checkout_service = self .adyen .checkout .payments_api .service
544+ payment_service = self .adyen .payment .payments_api .service
545+ checkout_base_url = self .adyen .checkout .payments_api .baseUrl
546+ payment_base_url = self .adyen .payment .payments_api .baseUrl
547+
548+ self .assertEqual ("checkout" , checkout_service )
549+ self .assertEqual ("payments" , payment_service )
550+ self .assertTrue (checkout_base_url .startswith ("https://checkout-test.adyen.com/" ))
551+ self .assertTrue (payment_base_url .startswith ("https://pal-test.adyen.com/pal/servlet/Payment/" ))
552+
You can’t perform that action at this time.
0 commit comments