Sha256: e4e1d849a3123d308c12815bdac000c86f66eb82b8fea82de74fb019c1e5e8c4
Contents?: true
Size: 498 Bytes
Versions: 11
Compression:
Stored size: 498 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Valvat::Checksum::FI do %w[FI13669598 FI20584306 FI01080233].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[-1]}#{valid_vat[-2]}#{valid_vat[-3]}" 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