Sha256: b5efdc3023e500923838c4ec143fa8b908b743ecce394808112806403312504b

Contents?: true

Size: 912 Bytes

Versions: 25

Compression:

Stored size: 912 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe SEPA::CreditorAccount do
  it 'should initialize a new account' do
    expect(
      SEPA::CreditorAccount.new name:                'Gläubiger GmbH',
                                bic:                 'BANKDEFFXXX',
                                iban:                'DE87200500001234567890',
                                creditor_identifier: 'DE98ZZZ09999999999'
    ).to be_valid
  end

  describe :creditor_identifier do
    it 'should accept valid value' do
      expect(SEPA::CreditorAccount).to accept('DE98ZZZ09999999999', 'AT12ZZZ00000000001', 'IT97ZZZA1B2C3D4E5F6G7H8', 'NL97ZZZ123456780001', 'FR12ZZZ123456', for: :creditor_identifier)
    end

    it 'should not accept invalid value' do
      expect(SEPA::CreditorAccount).not_to accept('', 'invalid', 'DE98ZZZ099999999990', 'DEAAAAAAAAAAAAAAAA', for: :creditor_identifier)
    end
  end
end

Version data entries

25 entries across 25 versions & 3 rubygems

Version Path
sepa_king-0.13.0 spec/creditor_account_spec.rb
sepa_king_codeur-0.12.1 spec/creditor_account_spec.rb
sepa_king-0.12.0 spec/creditor_account_spec.rb
sepa_king-0.11.2 spec/creditor_account_spec.rb
sepa_king-0.11.1 spec/creditor_account_spec.rb
sepa_king_extended-0.12.2 spec/creditor_account_spec.rb
sepa_king_extended-0.12.1 spec/creditor_account_spec.rb
sepa_king_extended-0.12.0 spec/creditor_account_spec.rb
sepa_king_extended-0.11.6 spec/creditor_account_spec.rb
sepa_king_extended-0.11.5 spec/creditor_account_spec.rb
sepa_king_extended-0.11.4 spec/creditor_account_spec.rb
sepa_king_extended-0.11.3 spec/creditor_account_spec.rb
sepa_king_extended-0.11.2 spec/creditor_account_spec.rb
sepa_king-0.11.0 spec/creditor_account_spec.rb
sepa_king_extended-0.11.1 spec/creditor_account_spec.rb
sepa_king_extended-0.11.0 spec/creditor_account_spec.rb
sepa_king_extended-0.10.1 spec/creditor_account_spec.rb
sepa_king-0.10.1 spec/creditor_account_spec.rb
sepa_king-0.10.0 spec/creditor_account_spec.rb
sepa_king-0.9.0 spec/creditor_account_spec.rb