<commit_before>require 'test_helper'

class ArticleControllerTest < ActionController::TestCase
  # test "the truth" do
  #   assert true
  # end
end<commit_msg>try to add some tests - all tests fail<commit_after>require 'test_helper'

class ArticleControllerTest < ActionController::TestCase
  test "should not save article without link, author and quote" do
    a = Article.new
    assert_not a.save
  end

  test "should not save article without author and quote" do
    a = Article.new
    a.link = "http://example.com"
    assert_not a.save
  end

  test "should not save article without quote" do
    a = Article.new
    a.link = "http://example.com"
    a.author = "<NAME>"
    assert_not a.save
  end

  test "should save article with link, author and quote (bare minimum)" do
    a = Article.new
    a.link = "http://example.com"
    a.author = "<NAME>"
    a.quote = "We are so cute, I wanna punch us in the face"
    assert a.save
  end

  test "should not save article with invalid link" do
    a = Article.new
    a.link = "notalink"
    a.author = "<NAME>"
    a.quote = "We are so cute, I wanna punch us in the face"
    assert_not a.save
  end
end
{'fraction_non_alphanumeric': 0.09208261617900172, 'fraction_numerical': 0.0, 'mean_word_length': 2.9158249158249157, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 6, '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': '3620835', 'n_tokens_mistral': 365, 'n_tokens_neox': 359, 'n_words': 140}