debian-mirror-gitlab/spec/controllers/profiles/active_sessions_controller_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
508 B
Ruby
Raw Normal View History

2020-09-03 11:15:55 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Profiles::ActiveSessionsController do
describe 'DELETE destroy' do
let_it_be(:user) { create(:user) }
before do
sign_in(user)
end
it 'invalidates all remember user tokens' do
ActiveSession.set(user, request)
2021-03-05 16:19:46 +05:30
session_id = request.session.id.private_id
2020-09-03 11:15:55 +05:30
user.remember_me!
delete :destroy, params: { id: session_id }
expect(user.reload.remember_created_at).to be_nil
end
end
end