Sha256: d20752428e6652f4563ae87b088155910ffea1210cc1996d38daff89c046757e

Contents?: true

Size: 406 Bytes

Versions: 2

Compression:

Stored size: 406 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class CPFFormatterTest < Minitest::Test
  test "formats strings without separators" do
    number = "12345678901234"
    assert_equal "12.345.678/9012-34", CNPJ::Formatter.format(number)
  end

  test "removes any non-numeric characters" do
    number = "\n12$345[678/9012-34"
    assert_equal "12345678901234", CNPJ::Formatter.strip(number)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cpf_cnpj-0.5.0 test/unit/cpf/formatter_test.rb
cpf_cnpj-0.4.1 test/unit/cpf/formatter_test.rb