<commit_before>require 'test_helper'

class CategoryTest < ActiveSupport::TestCase
  # test "the truth" do
  #   assert true
  # end
end
<commit_msg>Add tests for category model<commit_after>require 'test_helper'

class CategoryTest < ActiveSupport::TestCase
  setup do
    @category = categories(:arduino)
  end

  test "Category should be valid" do
    assert @category.valid?
  end

  test "Category without a name should not be valid" do
    @category.name = ''
    assert_not @category.valid?
  end

  test "Category's children should not be empty" do
    assert_not @category.children.empty?
  end
end

{'fraction_non_alphanumeric': 0.07894736842105263, 'fraction_numerical': 0.0, 'mean_word_length': 3.872, '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': '4984406', 'n_tokens_mistral': 184, 'n_tokens_neox': 179, 'n_words': 62}