<commit_before>require "test_helper"

class HashTest < ActiveSupport::TestCase

  test "compact" do
    hash = { "a" => "", "b" => nil, "c" => "hello" }
    expected = { "c" => "hello" }
    assert_equal expected, hash.compact
  end

  test "cleanup" do
    whitelist = %w(controller action id input layout resource resource_id resource_action selected back_to )
    whitelist.each do |w|
      expected = { w => w }
      assert_equal expected, expected.dup.cleanup
    end
  end<commit_msg>Whitelist has been updated.<commit_after>require "test_helper"

class HashTest < ActiveSupport::TestCase

  test "compact" do
    hash = { "a" => "", "b" => nil, "c" => "hello" }
    expected = { "c" => "hello" }
    assert_equal expected, hash.compact
  end

  test "cleanup" do
    whitelist = %w(controller action id _input _popup resource attribute)
    whitelist.each do |w|
      expected = { w => w }
      assert_equal expected, expected.dup.cleanup
    end
  end
{'fraction_non_alphanumeric': 0.12357217030114226, 'fraction_numerical': 0.0, 'mean_word_length': 3.2096069868995634, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3925678', 'n_tokens_mistral': 311, 'n_tokens_neox': 301, 'n_words': 91}