Add rspec test for reset_authentication_token without current_user
closes #6707
This commit is contained in:
parent
27a8e0fbca
commit
374679c093
2 changed files with 24 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue