<commit_before>require 'test_helper'

class TemplatesControllerTest < ActionController::TestCase
  setup do
    @template = Template.new('../test_templates/template_one')
    @template_bad = Template.new('../test_templates/template_two_broken')
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:templates)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  #test "should create template" do
  #  assert_difference('Template.count') do
  #    post :create, template: { name: @template.name, path: @template.path }
  #  end
  #
  #  assert_redirected_to template_path(assigns(:template))
  #end

  #test "should show template" do
  #  get :show, id: @template
  #  assert_response :success
  #end

  #test "should get edit" do
  #  get :edit, id: @template
  #  assert_response :success
  #end

  #test "should update template" do
  #  patch :update, id: @template, template: { name: @template.name, path: @template.path }
  #  assert_redirected_to template_path(assigns(:template))
  #end

  #test "should destroy template" do
  #  assert_difference('Template.count', -1) do
  #    delete :destroy, id: @template
  #  end

  #  assert_redirected_to templates_path
  #end
end<commit_msg>remove tests of unused routes<commit_after>require 'test_helper'

class TemplatesControllerTest < ActionController::TestCase
  setup do
    @template = Template.new('./test/test_templates/template_one')
    @template_bad = Template.new('./test/test_templates/template_two_broken')
  end

  # Verify the templates are loaded properly.
  test "valid_template" do
    assert_equal( @template.path.to_s, "./test/test_templates/template_one" )
    assert @template.path.exist?

    assert_equal( @template_bad.path.to_s, "./test/test_templates/template_two_broken" )
    assert @template_bad.path.exist?
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:templates)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  #test "should create template" do
  #  assert_difference('Template.count') do
  #    post :create, template: { name: @template.name, path: @template.path }
  #  end
  #
  #  assert_redirected_to template_path(assigns(:template))
  #end

  #test "should update template" do
  #  patch :update, id: @template, template: { name: @template.name, path: @template.path }
  #  assert_redirected_to template_path(assigns(:template))
  #end

  #test "should destroy template" do
  #  assert_difference('Template.count', -1) do
  #    delete :destroy, id: @template
  #  end

end
{'fraction_non_alphanumeric': 0.10947527368818422, 'fraction_numerical': 0.0007550018875047187, 'mean_word_length': 3.9074074074074074, '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': '6951572', 'n_tokens_mistral': 859, 'n_tokens_neox': 835, 'n_words': 216}