Sha256: 653e7023dc47b799543d9814505f1b4c13af3ee07867d1455052c3b3845cf495
Contents?: true
Size: 536 Bytes
Versions: 17
Compression:
Stored size: 536 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::BG do %w(BG123456786 BG926067143 BG926067770 BG0101011739 BG0121013021 BG5041019992 BG1521687837 BG1431889037).each do |valid_vat| it "returns true on valid vat #{valid_vat}" do expect(Valvat::Checksum.validate(valid_vat)).to eql(true) end invalid_vat = "#{valid_vat[0..-4]}#{valid_vat[-1]}#{valid_vat[-2]}#{valid_vat[-4]}" it "returns false on invalid vat #{invalid_vat}" do expect(Valvat::Checksum.validate(invalid_vat)).to eql(false) end end end
Version data entries
17 entries across 17 versions & 1 rubygems