Sha256: 2d8387247a8303faf136d128acdcfa6a658c4d0ce8a4d07b476408db65874edd
Contents?: true
Size: 485 Bytes
Versions: 11
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true 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 expect(Valvat::Checksum.validate(valid_vat)).to be(true) end invalid_vat = "#{valid_vat[0..-3]}#{valid_vat[-1]}#{valid_vat[-2]}" it "returns false on invalid VAT #{invalid_vat}" do expect(Valvat::Checksum.validate(invalid_vat)).to be(false) end end end
Version data entries
11 entries across 11 versions & 1 rubygems