Sha256: d1d2a6ebef06b8f5f1e6df9f41a962df782784c4a552de0781b95e569ed48f2a
Contents?: true
Size: 463 Bytes
Versions: 6
Compression:
Stored size: 463 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::AT do %w(ATU13585627 ATU66059506 ATU42403001).each do |valid_vat| it "returns true on valid vat #{valid_vat}" do Valvat::Checksum.validate(valid_vat).should eql(true) end invalid_vat = "#{valid_vat[0..-4]}#{valid_vat[-1]}#{valid_vat[-2]}#{valid_vat[-3]}" it "returns false on invalid vat #{invalid_vat}" do Valvat::Checksum.validate(invalid_vat).should eql(false) end end end
Version data entries
6 entries across 6 versions & 1 rubygems