Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store routing context when mounting engine, Fix i18n path #14

Merged
merged 10 commits into from
Mar 8, 2018
Prev Previous commit
Next Next commit
Keep routes the way they were
  • Loading branch information
Gregory Igelmund committed Mar 7, 2018
commit 6e5e00d744eb7a90095736caa7f11fbf4fa53ed3
2 changes: 1 addition & 1 deletion test/dummy/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
resources :users
resources :registrations, only: %i[new create]

get '/secret', to: 'secrets#index', as: :secret
get '/secret', to: 'secrets#index'

root to: 'users#index'
end
4 changes: 2 additions & 2 deletions test/integration/navigation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class NavigationTest < ActionDispatch::IntegrationTest
# Verify the user has no access to the /secret endpoint and
# is instead redirected to homepage. Meanwhile access to /secret is
# stored in the users session.
get secret_path
get '/secret'
assert_equal 302, status
assert_equal 'Not worthy!', flash['error']
follow_redirect!
Expand Down Expand Up @@ -53,7 +53,7 @@ class NavigationTest < ActionDispatch::IntegrationTest
follow_redirect!

assert_equal 200, status
assert_equal secret_path, path
assert_equal '/secret', path
assert_equal 'shhhh! secrets!', response.body
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glorious! 🎉

end
end