-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
BugSomething is not working as expectedSomething is not working as expected
Description
Describe the bug
Case 1
If you set any locale in the default configuration file except :en, then some tests fail.
This is because error messages in these tests are waiting for messages in the en locale.
To solve this situation, specify
config.i18n.default_locale = :en for config/environments/test.rb
Case 2
Error example
response was a 500 because an UnsafeRedirectError exception
1) Session GET /auth/sign_in redirects to the frontend login page with error
Failure/Error: expect(response).to redirect_to(%r{/app/login\?error=access-denied$})
Expected response to be a <3XX: redirect>, but was a <500: Internal Server Error>
ActionController::Redirecting::UnsafeRedirectError:
Unsafe redirect to "http://0.0.0.0:3000....
To solve this error need add
config.action_controller.raise_on_open_redirects = false to config/environments/test.rb
To Reproduce
- set any default locale except
:en - run command
bundle exec rspec spec
Expected behavior
No response
Environment
app.chatwoot.com
Cloud Provider
None
Platform
None
Operating system
Mac os Sonoma
Browser and version
No response
Docker (if applicable)
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugSomething is not working as expectedSomething is not working as expected