Sha256: 58d1f041041cc0efad4be4e42fb652d6838593d78b58c7be45ab1d80bcd0477b
Contents?: true
Size: 447 Bytes
Versions: 11
Compression:
Stored size: 447 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::FR do %w(FR60528551658 FR43820567501).each do |valid_vat| it "returns true on valid vat #{valid_vat}" do expect(Valvat::Checksum.validate(valid_vat)).to eql(true) end invalid_vat = "#{valid_vat[0..-3]}#{valid_vat[-1]}#{valid_vat[-2]}" it "returns false on invalid vat #{invalid_vat}" do expect(Valvat::Checksum.validate(invalid_vat)).to eql(false) end end end
Version data entries
11 entries across 11 versions & 1 rubygems