Sha256: ce047ac95a8ef3d2d4e9c246a984528e8aa225073e0756323bd187fd95cfbb62
Contents?: true
Size: 447 Bytes
Versions: 6
Compression:
Stored size: 447 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::GR do %w(EL123456783 EL094543092 EL998219694).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