Sha256: 788a4bd72966fab3387ed773c92105821cf532e7c029c15f23b1a38f316fa858

Contents?: true

Size: 468 Bytes

Versions: 1

Compression:

Stored size: 468 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.1 spec/pesel_validator_spec.rb