Sha256: 2a4dab26ce51d53ef4904b3d640e7feb653ac6e8e5f01b3e2083f72c1dba010a

Contents?: true

Size: 893 Bytes

Versions: 7

Compression:

Stored size: 893 Bytes

Contents

require 'spec_helper'

module BankingData
  describe GermanBank do
    describe 'end-to-end test' do
      ['MARKDEF1100', 'BELADEBEXXX', 'SLZODE22XXX'].each do |bic|
        it "includes #{bic}" do
          expect(GermanBank.only(:bic).map(&:first)).to include(bic)
          expect(Bank.where(locale: :de).only(:bic).map(&:first))
            .to include(bic)
        end
      end

      ['76350000', '37040044', '40050150'].each do |blz|
        it "includes #{blz}" do
          expect(GermanBank.only(:blz).map(&:first)).to include(blz)
          expect(GermanBank.map(&:blz)).to include(blz)
          expect(GermanBank.only(:blz).flatten).to include(blz)
          expect(Bank.where(locale: :de, blz: blz).only(:blz).first)
            .to eq([blz])
          expect(Bank.where(blz: blz, locale: :de).only(:blz).last)
            .to eq([blz])
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
banking_data-0.9.4 spec/banking_data/german_bank_spec.rb
banking_data-0.9.3 spec/banking_data/german_bank_spec.rb
banking_data-0.9.2 spec/banking_data/german_bank_spec.rb
banking_data-0.9.1 spec/banking_data/german_bank_spec.rb
banking_data-0.9.0 spec/banking_data/german_bank_spec.rb
banking_data-0.8.0 spec/banking_data/german_bank_spec.rb
banking_data-0.7.2 spec/banking_data/german_bank_spec.rb