From 017d98144acd7c5e7f11a97fa96a84158e7252d0 Mon Sep 17 00:00:00 2001 From: Martin Hradil Date: Thu, 9 Aug 2018 16:13:31 +0000 Subject: [PATCH] Remove Settings.product.transformation - add missing specs this is a spec for 0f14276 --- ...emove_transformation_product_setting_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/migrations/20180718132840_remove_transformation_product_setting_spec.rb diff --git a/spec/migrations/20180718132840_remove_transformation_product_setting_spec.rb b/spec/migrations/20180718132840_remove_transformation_product_setting_spec.rb new file mode 100644 index 000000000..a68ca80c9 --- /dev/null +++ b/spec/migrations/20180718132840_remove_transformation_product_setting_spec.rb @@ -0,0 +1,17 @@ +require_migration + +describe RemoveTransformationProductSetting do + let(:settings_change_stub) { migration_stub(:SettingsChange) } + + migration_context :up do + it "removes the /product/transformation key" do + setting_changed = settings_change_stub.create!(:key => "/product/transformation", :value => true) + setting_ignored = settings_change_stub.create!(:key => "/product/magic", :value => true) + + migrate + + expect { setting_changed.reload }.to raise_error(ActiveRecord::RecordNotFound) + expect(setting_ignored.reload.value).to eq(true) + end + end +end