Sha256: 3b8db3b4bde8b386045aae4758a15bb08660cb2434f5a5a5c8e92e32dfabac39
Contents?: true
Size: 450 Bytes
Versions: 6
Compression:
Stored size: 450 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::BE do %w(BE0123456749 BE0136695962 BE0817331995).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..-3]}#{valid_vat[-1]}#{valid_vat[-2]}" 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