require'spec_helper'requireRails.root.join('db','migrate','20180531220618_change_default_value_for_dsa_key_restriction.rb')describeChangeDefaultValueForDsaKeyRestriction,:migrationdolet(:application_settings){table(:application_settings)}beforedoapplication_settings.create!endit'changes the default value for dsa_key_restriction'doexpect(application_settings.first.dsa_key_restriction).toeq(0)migrate!application_settings.reset_column_informationnew_setting=application_settings.create!expect(application_settings.count).toeq(2)expect(new_setting.dsa_key_restriction).toeq(-1)endit'changes the existing setting'dosetting=application_settings.lastexpect(setting.dsa_key_restriction).toeq(0)migrate!expect(application_settings.count).toeq(1)expect(setting.reload.dsa_key_restriction).toeq(-1)endend