<commit_before>describe MangoPay::KycDocument do
  include_context 'kyc_documents'

  describe 'CREATE' do
    it 'creates a document' do
      expect(new_document['Id']).to_not be_nil
      expect(new_document['Type']).to eq('IDENTITY_PROOF')
      expect(new_document['Status']).to eq('CREATED')
      expect(new_document['RefusedReasonType']).to be_nil
      expect(new_document['RefusedReasonMessage']).to be_nil
    end
  end

  describe 'UPDATE' do
    it 'updates a document' do
      fnm = __FILE__.sub('.rb', '.png')
      ret = MangoPay::KycDocument.create_page(new_natural_user['Id'], new_document['Id'], nil, fnm)
      
      updated_document = MangoPay::KycDocument.update(new_natural_user['Id'], new_document['Id'], {
        Status: 'VALIDATION_ASKED'
      })
      expect(updated_document['Id']).to eq(new_document['Id'])
      expect(updated_document['Status']).to eq('VALIDATION_ASKED')<commit_msg>MPSDK-945: Flags in KycDocument<commit_after>describe MangoPay::KycDocument do
  include_context 'kyc_documents'

  describe 'CREATE' do
    it 'creates a document' do
      expect(new_document['Id']).to_not be_nil
      expect(new_document['Type']).to eq('IDENTITY_PROOF')
      expect(new_document['Status']).to eq('CREATED')
      expect(new_document['RefusedReasonType']).to be_nil
      expect(new_document['RefusedReasonMessage']).to be_nil
      expect(new_document['Flags']).to match_array([])
    end
  end

  describe 'UPDATE' do
    it 'updates a document' do
      fnm = __FILE__.sub('.rb', '.png')
      ret = MangoPay::KycDocument.create_page(new_natural_user['Id'], new_document['Id'], nil, fnm)
      
      updated_document = MangoPay::KycDocument.update(new_natural_user['Id'], new_document['Id'], {
        Status: 'VALIDATION_ASKED'
      })
      expect(updated_document['Id']).to eq(new_document['Id'])
      expect(updated_document['Status']).to eq('VALIDATION_ASKED')
{'fraction_non_alphanumeric': 0.14405447878470404, 'fraction_numerical': 0.001571503404924044, 'mean_word_length': 4.426136363636363, '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': '3204045', 'n_tokens_mistral': 629, 'n_tokens_neox': 621, 'n_words': 104}