Sha256: ec0b26614b86fddd4dc73c23e0495127fb1a4a8cba18f250152234b40a5fd5ce
Contents?: true
Size: 433 Bytes
Versions: 6
Compression:
Stored size: 433 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::DK do %w(DK13585628 DK61126228).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