spec/support/cookieless_controller.rb in cookieless_sessions-1.0.0 vs spec/support/cookieless_controller.rb in cookieless_sessions-1.0.1

- old
+ new

@@ -1,7 +1,8 @@ Rails.application.routes.draw do get "/cookieless" => "cookieless#index", as: :root + get "/cookieless/reset" => "cookieless#reset_index", as: :reset_root get "/cookieless/redirect" => "cookieless#redirect_to_root", as: :redirect_to_root end class ApplicationController < ActionController::Base @@ -14,10 +15,16 @@ protect_from_forgery with: :exception def index session[:useless] = :content - render text: "CookielessController#Index\r\nSession-Key: '#{session_key}'\r\nSession-ID: '#{session_id}'\r\n" + render text: "CookielessController#Index\r\nSession-Key: '#{session_key}'\r\nSession-ID: '#{session_id}'\r\nRails-Version: '#{Rails.version}'\r\n" + end + + def reset_index + reset_session + + render text: "CookielessController#Index\r\nSession-Key: '#{session_key}'\r\nSession-ID: '#{session_id}'\r\nRails-Version: '#{Rails.version}'\r\n" end def redirect_to_root redirect_to root_url end