Commit 374679c0 authored by Steffen van Bergerem's avatar Steffen van Bergerem Committed by Dennis Schubert

Add rspec test for reset_authentication_token without current_user

closes #6707
parent 27a8e0fb
......@@ -3,7 +3,8 @@
## Refactor
## Bug fixes
* Fix empty name field when editing aspect names [#6548](https://github.com/diaspora/diaspora/issues/6548)
* Fix empty name field when editing aspect names [#6706](https://github.com/diaspora/diaspora/pull/6706)
* Fix internal server error when trying to log out of an expired session [#6707](https://github.com/diaspora/diaspora/pull/6707)
## Features
......
......@@ -47,4 +47,26 @@ describe SessionsController, type: :controller do
expect(response).to redirect_to root_path
end
end
describe "#reset_authentication_token" do
context "for a logged in user" do
before do
sign_in :user, @user
end
it "succeeds" do
expect { @controller.send(:reset_authentication_token) }.to_not raise_error
end
end
context "for a logged out user" do
before do
sign_out :user
end
it "succeeds" do
expect { @controller.send(:reset_authentication_token) }.to_not raise_error
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment