Skip to content

Commit

Permalink
Merge remote-tracking branch 'contrib-sethpollack/fix-tests'
Browse files Browse the repository at this point in the history
Conflicts:
	test/slug.test.coffee
  • Loading branch information
dodo committed Apr 18, 2015
2 parents 54ca940 + a1bf7ae commit 8d79257
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/slug.test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ describe 'slug', ->
[slug "foo #{a} bar baz",
mode: "rfc3986"].should.eql ["foo-#{a}-bar-baz"]

it 'should leave allowed chars in pretty mode', ->
allowed = ['_', '~']
for a in allowed
[slug "foo #{a} bar baz"].should.eql ["foo-#{a}-bar-baz"]

it 'should replace latin chars', ->
char_map = {
'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE',
Expand Down Expand Up @@ -153,6 +158,9 @@ describe 'slug', ->
for char, replacement of char_map
[slug "foo #{char} bar baz"].should.eql ["foo-bar-baz"]

it 'should strip … symbols in pretty mode', ->
[slug "foo … bar baz"].should.eql ["foo-bar-baz"]

it 'should strip symbols', ->
char_map = [
'', '', '', '', '', ''
Expand Down

0 comments on commit 8d79257

Please sign in to comment.