From 71921f6bc35b3bbcca8147b20befea113a21dd1f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 25 Jan 2020 05:22:35 +0100 Subject: Fix user disabling changing activity timestamps, fix nil error (#12943) --- spec/models/user_spec.rb | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'spec') diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index d7c0b5359..5686ec909 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -322,20 +322,7 @@ RSpec.describe User, type: :model do end it 'disables user' do - expect(user).to have_attributes(disabled: true, current_sign_in_at: nil, last_sign_in_at: current_sign_in_at) - end - end - - describe '#disable!' do - subject(:user) { Fabricate(:user, disabled: false, current_sign_in_at: current_sign_in_at, last_sign_in_at: nil) } - let(:current_sign_in_at) { Time.zone.now } - - before do - user.disable! - end - - it 'disables user' do - expect(user).to have_attributes(disabled: true, current_sign_in_at: nil, last_sign_in_at: current_sign_in_at) + expect(user).to have_attributes(disabled: true) end end -- cgit