From 4f7acd4f26029487a4a91e6cd7b8f3585b0d754b Mon Sep 17 00:00:00 2001 From: Brian McLaughlin Date: Mon, 29 Apr 2019 13:38:29 -0400 Subject: [PATCH] Add spec test --- .../application_controller/filter/expression_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/controllers/application_controller/filter/expression_spec.rb b/spec/controllers/application_controller/filter/expression_spec.rb index 9f2d8f63d68..6d1b8510982 100644 --- a/spec/controllers/application_controller/filter/expression_spec.rb +++ b/spec/controllers/application_controller/filter/expression_spec.rb @@ -64,6 +64,12 @@ expect(controller).to receive(:render) controller.send(:exp_changed) expect(expression.exp_key).to eq('IS') + controller.instance_variable_set(:@expkey, :record_filter) + controller.instance_variable_set(:@_params, :chosen_field => "Flavor.cloud_tenants-id") + expect(controller).to receive(:render) + controller.send(:exp_changed) + expect(expression.exp_key).to_not eq('CONTAINS') + expect(expression.exp_key).to eq('=') end end end