Sha256: f9325a05b9e0fc8672887c9090140d5673d7771dc2b0f75c5ca7129b1b5f88b8

Contents?: true

Size: 1.38 KB

Versions: 5

Compression:

Stored size: 1.38 KB

Contents

require File.join(Dir.pwd, 'spec', 'spec_helper')

describe 'Experian::DataDictionary 0100' do

  context 'valid lookup' do
    it { expect( Experian::DataDictionary.column_name('0100') ).to eq('Date of Birth') }
    it { expect( Experian::DataDictionary.lookup('0100','198412') ).to eq('12/1984') }
    it { expect( Experian::DataDictionary.lookup('0100','19931') ).to eq('1/1993') }
    it { expect( Experian::DataDictionary.lookup('0100','19684') ).to eq('4/1968') }
  end


  context 'invalid lookup' do
    it { expect( Experian::DataDictionary.lookup('0100','0') ).to eq('0') }
  end

end

describe 'Experian::DataDictionary 0100c' do

  context 'valid lookup' do
    it { expect( Experian::DataDictionary.column_name('0100c') ).to eq('Combined Adult Age') }
    it { expect( Experian::DataDictionary.lookup('0100c','e99') ).to eq('99 - Exact age') }
    it { expect( Experian::DataDictionary.lookup('0100c','i50') ).to eq('50 - Estimated age') }
    it { expect( Experian::DataDictionary.lookup('0100c','u') ).to eq(' - Unknown age') }
    it { expect( Experian::DataDictionary.lookup('0100c','') ).to eq('Unknown age') }

  end


  context 'invalid lookup' do
    it { expect( Experian::DataDictionary.lookup('0100c','D') ).to be_nil }
    it { expect( Experian::DataDictionary.lookup('0100c','GG') ).to be_nil }
    it { expect( Experian::DataDictionary.lookup('0100c','DOG') ).to be_nil }
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
experian-data-dictionary-1.4.4 spec/functional/0100/en_0100_spec.rb
experian-data-dictionary-1.4.3 spec/functional/en_0100_spec.rb
experian-data-dictionary-1.4.2 spec/functional/en_0100_spec.rb
experian-data-dictionary-1.4.1 spec/functional/en_0100_spec.rb
experian-data-dictionary-1.4 spec/functional/en_0100_spec.rb