Sha256: 9fa43b1537139762b82dc74150e4e49dab722e2b526f5ebb3e59ce6ad13dded3

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

# frozen_string_literal: true

require "test_helper"

class PermalinkTest < Minitest::Test
  {
    "This IS a Tripped out title!!.!1  (well/ not really)" => "this-is-a-tripped-out-title-1-well-not-really", # rubocop:disable Layout/LineLength
    '////// meph1sto r0x ! \\\\\\' => "meph1sto-r0x",
    "āčēģīķļņū" => "acegiklnu",
    "中文測試 chinese text" => "chinese-text",
    'some-)()()-ExtRa!/// .data==?>   to \/\/test' => "some-extra-data-to-test",
    "http://simplesideias.com.br/tags/" => "http-simplesideias-com-br-tags",
    "Don't Repeat Yourself (DRY)" => "dont-repeat-yourself-dry",
    "Text\nwith\nline\n\n\tbreaks" => "text-with-line-breaks",
    "can't do it" => "cant-do-it",
    "i'm a dog" => "im-a-dog"
  }.each do |from, to|
    test "creates permalink for #{from}" do
      assert_equal to, Permalink.generate(from)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
permalink-2.1.0 test/permalink/permalink_test.rb