We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f7e6d7 commit d7b4841Copy full SHA for d7b4841
spec/kracken/controllers/authenticatable_spec.rb
@@ -137,6 +137,15 @@ class ControllerDouble < BaseControllerDouble
137
end
138
139
context "user cache key" do
140
+ it "does nothing if the session does not exist" do
141
+ allow(controller).to receive(:request).and_return(double(format: nil, fullpath: nil))
142
+ allow(controller).to receive(:redirect_to)
143
+
144
+ controller.handle_user_cache_key!
145
146
+ expect(controller).to_not have_received(:redirect_to)
147
+ end
148
149
it "ends session and redirects if stored key does not match session key" do
150
controller.session[:user_cache_key] = "123"
151
controller.session[:user_uid] = "123"
0 commit comments