Merge branch 'stable' into develop
This commit is contained in:
commit
535057aca4
3 changed files with 25 additions and 2 deletions
|
|
@ -127,7 +127,8 @@ Contributions are very welcome, the hard work is done!
|
|||
## 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
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ class SessionsController < Devise::SessionsController
|
|||
before_filter :reset_authentication_token, :only => [:destroy]
|
||||
|
||||
def reset_authentication_token
|
||||
current_user.reset_authentication_token!
|
||||
current_user.reset_authentication_token! unless current_user.nil?
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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