|
@@ -17,7 +17,7 @@ RSpec.describe Issue2140ResetLdapConfig, type: :db_migration do
|
|
|
end
|
|
|
end
|
|
|
|
|
|
- context 'when LDAP config is broken' do
|
|
|
+ context 'when LDAP config was assumed to be broken' do
|
|
|
let(:config) do
|
|
|
{ 'wizardData' =>
|
|
|
{ 'backend_user_attributes' =>
|
|
@@ -26,10 +26,8 @@ RSpec.describe Issue2140ResetLdapConfig, type: :db_migration do
|
|
|
{ 'baz' => 'qux' } } }.with_indifferent_access
|
|
|
end
|
|
|
|
|
|
- it 'removes the offending backend_user_attributes sub-hash' do
|
|
|
- expect { migrate }
|
|
|
- .to change { Setting.get('ldap_config') }
|
|
|
- .to(config.tap { |c| c[:wizardData].delete(:backend_user_attributes) })
|
|
|
+ it 'makes no changes' do
|
|
|
+ expect { migrate }.not_to change { Setting.get('ldap_config') }
|
|
|
end
|
|
|
end
|
|
|
end
|