Sha256: 0416b0ea2732de314933be49573d737119643705f93afb1595aae96aed9420f2

Contents?: true

Size: 781 Bytes

Versions: 20

Compression:

Stored size: 781 Bytes

Contents

# -*- coding: utf-8 -*-
require 'helper'

class TestVortexClientUtils < Test::Unit::TestCase
  include Vortex

  should "make sentence in to valid url withthout any url encoding" do
    assert_equal "hei-pa-deg", StringUtils.create_filename("Hei på deg")
    assert StringUtils.create_filename('áàâäãÃÄÂÀ') =~ /^a*$/
    assert StringUtils.create_filename('éèêëËÉÈÊ') =~ /^e*$/
    assert StringUtils.create_filename('íìîïIÎÌ') => /^i*$/
    assert StringUtils.create_filename('óòôöõÕÖÔÒ') => /^o*$/

    #      0000000001111111111222222222233333333334
    #      1234567890123456789012345678901234567890
    str = 'start! to ()[]{}__@__\/?/.,"§_»_%##!!!end;:stripped'
    assert_equal 'start-to-end', StringUtils.create_filename(str)
  end

end

Version data entries

20 entries across 17 versions & 1 rubygems

Version Path
vortex_client-0.7.3 test/test_vortex_utils.rb
vortex_client-0.7.2 test/test_vortex_utils.rb
vortex_client-0.7.0 test/test_vortex_utils.rb
vortex_client-0.6.0 test/test_vortex_utils.rb
vortex_client-0.5.9 test/test_vortex_utils.rb
vortex_client-0.5.8 test/test_vortex_utils.rb
vortex_client-0.5.6 test/test_vortex_utils.rb
vortex_client-0.5.5 test/test_vortex_utils.rb
vortex_client-0.5.4 test/test_vortex_utils.rb
vortex_client-0.5.3 test/test_vortex_utils_flymake.rb
vortex_client-0.5.3 test/test_vortex_utils.rb
vortex_client-0.5.2 test/test_vortex_utils.rb
vortex_client-0.5.2 test/test_vortex_utils_flymake.rb
vortex_client-0.5.1 test/test_vortex_utils_flymake.rb
vortex_client-0.5.1 test/test_vortex_utils.rb
vortex_client-0.5.0 test/test_vortex_utils.rb
vortex_client-0.4.0 test/test_vortex_utils.rb
vortex_client-0.3.1 test/test_vortex_utils.rb
vortex_client-0.3.0 test/test_vortex_utils.rb
vortex_client-0.2.0 test/test_vortex_utils.rb