[openstreetmap/openstreetmap-website] Create a SessionsController (#3147)
Tom Hughes
notifications at github.com
Wed Mar 24 13:50:44 UTC 2021
@tomhughes commented on this pull request.
Presumably at some point thing like the omniauth callbacks that use those shared routines should themselves move to the session controller given they are concerned with creating sessions? Though with the complication that they're also used in account creation :-(
> + )
+ assert_recognizes(
+ { :controller => "sessions", :action => "destroy", :format => "html" },
+ { :path => "/logout.html", :method => :get }
+ )
+ end
+
+ def test_login
+ user = create(:user)
+
+ get login_path
+ assert_response :redirect
+ assert_redirected_to login_path(:cookie_test => true)
+ follow_redirect!
+ assert_response :success
+ assert_template "sessions/new"
Presumably these template assertions could drop the `sessions` prefix now they been moved?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3147#pullrequestreview-619739377
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210324/4e38e47d/attachment.htm>
More information about the rails-dev
mailing list