<commit_before><commit_msg>add first test for form 8871<commit_after>require "minitest/autorun"
require "irs527"
require "date"
class TestForm7781 < MiniTest::Test
  def setup
    @file = File.open("test/sample.txt")
    @line = @file.readline.split("|")
    @form = Irs527::Form.new(@line)
  end

  def test_line_for_form_validity
    assert Irs527::Form.valid?(@line), true
  end

  def test_line_is_form_8871
    assert_equal @form.type[:form_type], :form_8871
  end

  def test_form_gets_created_as_8871
    form = @form.create!
    assert_instance_of Irs527::Form8871, form
  end

  def test_subsequent_rows_are_supplementary
    line = @file.readline.split("|")
    form = Irs527::Form.new(line)
    assert_equal form.supplementary?, true
  end
end
{'fraction_non_alphanumeric': 0.11007957559681697, 'fraction_numerical': 0.05172413793103448, 'mean_word_length': 4.431654676258993, 'pattern_counts': {'":': 0, '<': 4, '<?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': '4589349', 'n_tokens_mistral': 302, 'n_tokens_neox': 270, 'n_words': 54}