- assert_template "changeset/history"
- assert_select "span.username", "openIDuser"
- end
-
- def test_login_openid_remember_me
- OmniAuth.config.add_mock(:openid, :uid => "http://localhost:1123/john.doe")
-
- get "/login", :referer => "/history"
- assert_response :redirect
- assert_redirected_to :controller => :user, :action => :login, :cookie_test => true, :referer => "/history"
- follow_redirect!
- assert_response :success
- assert_template "user/login"
- post "/login", :openid_url => "http://localhost:1123/john.doe", :remember_me_openid => true, :referer => "/history"
- assert_response :redirect
- assert_redirected_to auth_path(:provider => "openid", :openid_url => "http://localhost:1123/john.doe", :origin => "/login?referer=%2Fhistory", :referer => "/history")
- follow_redirect!
- assert_response :redirect
- assert_redirected_to auth_success_path(:provider => "openid", :openid_url => "http://localhost:1123/john.doe", :origin => "/login?referer=%2Fhistory", :referer => "/history")
- follow_redirect!
- assert_response :redirect
- follow_redirect!
- assert_response :success
- assert_template "changeset/history"
- assert_select "span.username", "openIDuser"
- assert session.key?(:_remember_for)