<commit_before>require 'test_helper'

class JermControllerTest < ActionController::TestCase
  include AuthenticatedTestHelper
  
  fixtures :all

  test "index" do
    login_as(:quentin)
    get :index
    assert_response :success
  end

  test "no index for non-admin" do
    login_as(:aaron)
    get :index
    assert_redirected_to :root
  end

  
end<commit_msg>force jerm_enabled to be true for jerm controller tests<commit_after>require 'test_helper'

class JermControllerTest < ActionController::TestCase
  include AuthenticatedTestHelper
  
  fixtures :all

  test "index" do
    with_config_value :jerm_enabled,true do
      login_as(:quentin)
      get :index
      assert_response :success
    end
  end

  test "no index for non-admin" do
    with_config_value :jerm_enabled,true do
      login_as(:aaron)
      get :index
      assert_redirected_to :root
    end
  end

  
end
{'fraction_non_alphanumeric': 0.05855855855855856, 'fraction_numerical': 0.0, 'mean_word_length': 3.4228855721393034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4655668', 'n_tokens_mistral': 287, 'n_tokens_neox': 280, 'n_words': 77}