Change user settings to be stored in a more optimal way (#23630)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Eugen Rochko
2023-03-30 14:44:00 +02:00
committed by GitHub
parent e7c3e55874
commit a9b5598c97
36 changed files with 817 additions and 525 deletions

View File

@ -313,9 +313,9 @@ RSpec.describe User, type: :model do
end
describe 'settings' do
it 'is instance of Settings::ScopedSettings' do
it 'is instance of UserSettings' do
user = Fabricate(:user)
expect(user.settings).to be_a Settings::ScopedSettings
expect(user.settings).to be_a UserSettings
end
end
@ -379,16 +379,6 @@ RSpec.describe User, type: :model do
end
end
it_behaves_like 'Settings-extended' do
def create!
User.create!(account: Fabricate(:account, user: nil), email: 'foo@mastodon.space', password: 'abcd1234', agreement: true)
end
def fabricate
Fabricate(:user)
end
end
describe 'token_for_app' do
let(:user) { Fabricate(:user) }
let(:app) { Fabricate(:application, owner: user) }