Sha256: 54756ef1a3035b747c5b523bb786cf5631aa6318ff1127a31ae3ab53eb6ac08a
Contents?: true
Size: 488 Bytes
Versions: 11
Compression:
Stored size: 488 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Valvat::Checksum::BE do %w[BE0123456749 BE0136695962 BE0817331995].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