chore: Enable plan reconcile in self hosted (#9357)
This PR will revert the premium config in self hosted instances to its original state if any unauthorised modifications are made.
This commit is contained in:
@@ -5,8 +5,7 @@ class Internal::ReconcilePlanConfigService
|
||||
|
||||
create_premium_config_reset_warning if premium_config_reset_required?
|
||||
|
||||
# We will have this enabled in the future
|
||||
# reconcile_premium_config
|
||||
reconcile_premium_config
|
||||
reconcile_premium_features
|
||||
end
|
||||
|
||||
|
||||
@@ -34,15 +34,13 @@ RSpec.describe Internal::ReconcilePlanConfigService do
|
||||
expect(Redis::Alfred.get(Redis::Alfred::CHATWOOT_INSTALLATION_CONFIG_RESET_WARNING)).to be_nil
|
||||
end
|
||||
|
||||
# To be enabled in the future when method is uncommented
|
||||
|
||||
# it 'updates the premium configs to default' do
|
||||
# create(:installation_config, name: 'INSTALLATION_NAME', value: 'custom-name')
|
||||
# create(:installation_config, name: 'LOGO', value: '/custom-path/logo.svg')
|
||||
# service.perform
|
||||
# expect(InstallationConfig.find_by(name: 'INSTALLATION_NAME').value).to eq('Chatwoot')
|
||||
# expect(InstallationConfig.find_by(name: 'LOGO').value).to eq('/brand-assets/logo.svg')
|
||||
# end
|
||||
it 'updates the premium configs to default' do
|
||||
create(:installation_config, name: 'INSTALLATION_NAME', value: 'custom-name')
|
||||
create(:installation_config, name: 'LOGO', value: '/custom-path/logo.svg')
|
||||
service.perform
|
||||
expect(InstallationConfig.find_by(name: 'INSTALLATION_NAME').value).to eq('Chatwoot')
|
||||
expect(InstallationConfig.find_by(name: 'LOGO').value).to eq('/brand-assets/logo.svg')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when pricing plan is not community' do
|
||||
|
||||
Reference in New Issue
Block a user