<commit_before>require 'rails_helper'

describe Verification::Management::Document do
  describe "#valid_age?" do
    it "returns false when the user is younger than sixteen years old" do
      census_response = double(date_of_birth: Date.new(16.years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.valid_age?(census_response)).to be false
    end

    it "returns true when the user is sixteen years old" do
      census_response = double(date_of_birth: Date.new(16.years.ago.year, 16.years.ago.month, 16.years.ago.day))
      expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
    end

    it "returns true when the user is older than sixteen years old" do
      census_response = double(date_of_birth: Date.new(33.years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
    end
  end

  describe "#under_age?" do
    it "returns true when the user is younger than the user's minimum required age" do
      census_response = double(date_of_birth: Date.new(User.minimum_required_age.years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.under_age?(census_response)).to be true
    end

    it "returns false when the user is user's minimum required age" do
      census_response = double(date_of_birth: Date.new(User.minimum_required_age.years.ago.year, User.minimum_required_age.years.ago.month, User.minimum_required_age.years.ago.day))
      expect(Verification::Management::Document.new.under_age?(census_response)).to be false
    end

    it "returns false when the user is older than user's minimum required age" do
      census_response = double(date_of_birth: Date.new((User.minimum_required_age + 10).years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.under_age?(census_response)).to be false
    end
  end
end
<commit_msg>updates verification spec<commit_after>require 'rails_helper'

describe Verification::Management::Document do
  describe "#valid_age?" do
    it "returns false when the user is younger than the user's minimum required age" do
      census_response = double(date_of_birth: Date.new(User.minimum_required_age.years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.valid_age?(census_response)).to be false
    end

    it "returns true when the user has the user's minimum required age" do
      census_response = double(date_of_birth: Date.new(User.minimum_required_age.years.ago.year, 16.years.ago.month, 16.years.ago.day))
      expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
    end

    it "returns true when the user is older than the user's minimum required age" do
      census_response = double(date_of_birth: Date.new((User.minimum_required_age + 10).years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.valid_age?(census_response)).to be true
    end
  end

  describe "#under_age?" do
    it "returns true when the user is younger than the user's minimum required age" do
      census_response = double(date_of_birth: Date.new(User.minimum_required_age.years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.under_age?(census_response)).to be true
    end

    it "returns false when the user is user's minimum required age" do
      census_response = double(date_of_birth: Date.new(User.minimum_required_age.years.ago.year, User.minimum_required_age.years.ago.month, User.minimum_required_age.years.ago.day))
      expect(Verification::Management::Document.new.under_age?(census_response)).to be false
    end

    it "returns false when the user is older than user's minimum required age" do
      census_response = double(date_of_birth: Date.new((User.minimum_required_age + 10).years.ago.year, 12, 31))
      expect(Verification::Management::Document.new.under_age?(census_response)).to be false
    end
  end
end

{'fraction_non_alphanumeric': 0.10185420370840742, 'fraction_numerical': 0.013208026416052832, 'mean_word_length': 4.562146892655368, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6715184', 'n_tokens_mistral': 1270, 'n_tokens_neox': 1176, 'n_words': 303}