<commit_before>FactoryGirl.define do
  factory :litigator_claim, class: Claim::LitigatorClaim do

    court
    case_number         { random_case_number }
    creator             { build :external_user, :litigator }
    external_user       { creator }
    source              { 'web' }
    apply_vat           false
    offence             { create(:offence, :miscellaneous) } #only miscellaneous offences valid for LGFS
    case_type           { create(:case_type) }
    case_concluded_at   { 5.days.ago }

    after(:build) do |claim|
      claim.fees << build(:misc_fee, claim: claim) # fees required for valid claims
    end

    after(:create) do |claim|
      defendant = create(:defendant, claim: claim)
      create(:representation_order, defendant: defendant, representation_order_date: 380.days.ago)
      claim.reload
    end

    factory :unpersisted_litigator_claim do
      court         { build :court }
      external_user { creator }
      creator       { build :external_user, :litigator, provider: build(:provider, :lgfs) }
      external_user { creator }
      offence       { build :offence, offence_class: build(:offence_class) }
    end

    trait :draft do
      # do nothing as default state is draft
      # only here for iteration of all states in
      # rake task
    end

    #
    # states: initial/default state is draft
    # - alphabetical list
    #
    trait :allocated do
      after(:create) { |c| c.submit!; c.allocate!; }
    end

    trait :archived_pending_delete do
      after(:create) { |c| c.submit!; c.allocate!; set_amount_assessed(c); c.authorise!; c.archive_pending_delete! }
    end

    trait :authorised do
      after(:create) { |c|  c.submit!; c.allocate!; set_amount_assessed(c); c.authorise! }
    end

    trait :part_authorised do
      after(:create) { |c| c.submit!; c.allocate!; set_amount_assessed(c); c.authorise_part! }
    end

    trait :refused do
      after(:create) { |c| c.submit!; c.allocate!; c.refuse! }
    end

    trait :rejected do
      after(:create) { |c| c.submit!; c.allocate!; c.reject! }
    end

    trait :submitted do
      after(:create) { |c| c.submit! }
    end

  end
end

<commit_msg>Remove line added by mistake after merge.<commit_after>FactoryGirl.define do
  factory :litigator_claim, class: Claim::LitigatorClaim do

    court
    case_number         { random_case_number }
    creator             { build :external_user, :litigator }
    external_user       { creator }
    source              { 'web' }
    apply_vat           false
    offence             { create(:offence, :miscellaneous) } #only miscellaneous offences valid for LGFS
    case_type           { create(:case_type) }
    case_concluded_at   { 5.days.ago }

    after(:build) do |claim|
      claim.fees << build(:misc_fee, claim: claim) # fees required for valid claims
    end

    after(:create) do |claim|
      defendant = create(:defendant, claim: claim)
      create(:representation_order, defendant: defendant, representation_order_date: 380.days.ago)
      claim.reload
    end

    factory :unpersisted_litigator_claim do
      court         { build :court }
      creator       { build :external_user, :litigator, provider: build(:provider, :lgfs) }
      external_user { creator }
      offence       { build :offence, offence_class: build(:offence_class) }
    end

    trait :draft do
      # do nothing as default state is draft
      # only here for iteration of all states in
      # rake task
    end

    #
    # states: initial/default state is draft
    # - alphabetical list
    #
    trait :allocated do
      after(:create) { |c| c.submit!; c.allocate!; }
    end

    trait :archived_pending_delete do
      after(:create) { |c| c.submit!; c.allocate!; set_amount_assessed(c); c.authorise!; c.archive_pending_delete! }
    end

    trait :authorised do
      after(:create) { |c|  c.submit!; c.allocate!; set_amount_assessed(c); c.authorise! }
    end

    trait :part_authorised do
      after(:create) { |c| c.submit!; c.allocate!; set_amount_assessed(c); c.authorise_part! }
    end

    trait :refused do
      after(:create) { |c| c.submit!; c.allocate!; c.refuse! }
    end

    trait :rejected do
      after(:create) { |c| c.submit!; c.allocate!; c.reject! }
    end

    trait :submitted do
      after(:create) { |c| c.submit! }
    end

  end
end


{'fraction_non_alphanumeric': 0.10500919117647059, 'fraction_numerical': 0.001838235294117647, 'mean_word_length': 2.516155088852989, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2636810', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1357, 'n_words': 358}