Sha256: de4ee1ebacbc4313aa333a144450074788b9941bb21a8534066a5ace0355a715
Contents?: true
Size: 503 Bytes
Versions: 6
Compression:
Stored size: 503 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::NL do %w(NL123456782B12 NL802549391B01 NL808661863B01 NL820893559B01).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..-5]}#{valid_vat[-2]}#{valid_vat[-3]}#{valid_vat[-4]}#{valid_vat[-1]}" 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