mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Migrate unsubscribe keys to the database.
This should reduce a lot of the keys in redis.
This commit is contained in:
@ -384,29 +384,6 @@ describe User do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'temporary_key' do
|
||||
|
||||
let(:user) { Fabricate(:user) }
|
||||
let!(:temporary_key) { user.temporary_key}
|
||||
|
||||
it 'has a temporary key' do
|
||||
expect(temporary_key).to be_present
|
||||
end
|
||||
|
||||
describe 'User#find_by_temporary_key' do
|
||||
|
||||
it 'can be used to find the user' do
|
||||
expect(User.find_by_temporary_key(temporary_key)).to eq(user)
|
||||
end
|
||||
|
||||
it 'returns nil with an invalid key' do
|
||||
expect(User.find_by_temporary_key('asdfasdf')).to be_blank
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe 'email_hash' do
|
||||
before do
|
||||
@user = Fabricate(:user)
|
||||
|
Reference in New Issue
Block a user