diff --git a/test/lib/check_config_test.rb b/test/lib/check_config_test.rb index 6341d8b6e..5e290fc35 100644 --- a/test/lib/check_config_test.rb +++ b/test/lib/check_config_test.rb @@ -57,4 +57,10 @@ class CheckConfigTest < ActiveSupport::TestCase ENV.delete('test_other_env_key') end + test "should handle json value " do + stub_configs({ 'test_json_key' => '{"lang":{"en":"default.html"}}', 'test_invalid_json_key' => 'invalid_json_value' }) do + assert_equal 'default.html', CheckConfig.get('test_json_key', nil, :json) + assert_equal 'invalid_json_value', CheckConfig.get('test_invalid_json_key', nil, :json) + end + end end diff --git a/test/models/bot/smooch_7_test.rb b/test/models/bot/smooch_7_test.rb index 9b970fb47..8aee9c2af 100644 --- a/test/models/bot/smooch_7_test.rb +++ b/test/models/bot/smooch_7_test.rb @@ -413,6 +413,8 @@ def teardown sleep 2 # Wait for ElasticSearch to index content assert_equal [pm1.id, pm2.id, pm3.id], Bot::Smooch.search_for_similar_published_fact_checks('text', 'Foo Bar', [t.id]).to_a.map(&:id) + # Calling wiht skip_cache true + assert_equal [pm1.id, pm2.id, pm3.id], Bot::Smooch.search_for_similar_published_fact_checks('text', 'Foo Bar', [t.id], nil, nil, nil, true).to_a.map(&:id) end test "should store media" do