spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

Fix DefaultLoginPageConfigurerTests localization failure on system language different than english

Open CaptainAye opened this issue 1 year ago • 2 comments

The PR aims to fix the DefaultLoginPageConfigurerTests.loginPageWhenErrorThenDefaultLoginPageWithError() failure given the system language is set to something else than english.

When asserting the Bad credentials login page, the expected template contains the hardcoded "Bad credentials" message. When the system language is other than english, this test fails locally as the actual code will produce the localized version of this page.

This PR fixes the issue adding the localized message to the expected page template in order to make sure that it will match the actual response regardless the locale setting.

CaptainAye avatar Oct 04 '24 14:10 CaptainAye

@CaptainAye Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla avatar Oct 04 '24 14:10 pivotal-cla

@CaptainAye Thank you for signing the Contributor License Agreement!

pivotal-cla avatar Oct 04 '24 14:10 pivotal-cla

Thanks for the PR @CaptainAye! This is now merged into main.

sjohnr avatar Oct 24 '24 16:10 sjohnr