Sha256: b8b8864da58bd070045a4c96c9cd420488680f89584be5f8b88bf96d531f1276

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

require 'spec_helper'

describe PolishValidators::PeselValidator do
  describe '.valid?' do
    context 'with valid number' do
      it "return true" do
        pesel = PolishValidators::PeselValidator.new(44051401359)
        expect(pesel).to be_valid
      end
    end

    context 'with invalid number' do
      it "return false" do
        pesel = PolishValidators::PeselValidator.new(44051401358)
        expect(pesel).to_not be_valid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
polish_validators-1.0.0 spec/pesel_validator_spec.rb