Sha256: f0ad3e41ddd924b36cdebe4af97441fa4b771bc0904ae96f36e0803baba0a4ca

Contents?: true

Size: 390 Bytes

Versions: 6

Compression:

Stored size: 390 Bytes

Contents

require "spec_helper"

describe Jan::CheckDigitCalculator do
  describe ".calculate" do
    it "should return check digit" do
      actual = Jan::CheckDigitCalculator.calculate("490127724112")
      expect(actual).to eq(6)
    end

    it "should return 0 as check digit" do
      actual = Jan::CheckDigitCalculator.calculate("490330111020")
      expect(actual).to eq(0)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
jan-0.1.0 spec/jan/check_digit_calculator_spec.rb
jan-0.0.5 spec/jan/check_digit_calculator_spec.rb
jan-0.0.4 spec/jan/check_digit_calculator_spec.rb
jan-0.0.3 spec/jan/check_digit_calculator_spec.rb
jan-0.0.2 spec/jan/check_digit_calculator_spec.rb
jan-0.0.1 spec/jan/check_digit_calculator_spec.rb