FIX: always unstage users when they log in

This commit is contained in:
Régis Hanol
2018-05-13 17:00:02 +02:00
parent be6404d651
commit 2cf6fb7359
5 changed files with 33 additions and 9 deletions

View File

@ -313,6 +313,13 @@ describe Auth::DefaultCurrentUserProvider do
expect(provider("/", "HTTP_COOKIE" => "_t=#{token.unhashed_auth_token}").current_user).to eq(nil)
end
it "always unstage users" do
staged_user = Fabricate(:user, staged: true)
provider("/").log_on_user(staged_user, {}, {})
staged_user.reload
expect(staged_user.staged).to eq(false)
end
context "user api" do
let :user do
Fabricate(:user)