Sha256: 72f2b35072c2d450dfe071ab2c567d44855ffff7d43ae6e761101de398e115b9
Contents?: true
Size: 509 Bytes
Versions: 11
Compression:
Stored size: 509 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Valvat::Checksum::LU do %w[LU13669580 LU25361352 LU23124018 LU17560609].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..-4]}#{valid_vat[-2]}#{valid_vat[-3]}#{valid_vat[-1]}" 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