Sha256: 4049982883e2375764e180504b2bd1be36a731e50a05ae01f6100214f522cd1e
Contents?: true
Size: 441 Bytes
Versions: 17
Compression:
Stored size: 441 Bytes
Contents
require 'spec_helper' describe Valvat::Checksum::DK do %w(DK13585628 DK61126228).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..-3]}#{valid_vat[-1]}#{valid_vat[-2]}" 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