Permalink
Browse files

Add tests for slugs ending with numbers.

  • Loading branch information...
1 parent 2997285 commit 7a94add5efc868d16e1d71f751db63c41e6e4549 @norman norman committed Dec 14, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/slugged_test.rb
@@ -100,6 +100,15 @@ def model_class
end
end
+ test "should correctly sequence slugs that end with numbers" do
+ transaction do
+ record1 = model_class.create! :name => "Peugeuot 206"
+ assert_equal "peugeuot-206", record1.slug
+ record2 = model_class.create! :name => "Peugeuot 206"
+ assert_equal "peugeuot-206--2", record2.slug
+ end
+ end
+
end
class SlugSeparatorTest < MiniTest::Unit::TestCase

0 comments on commit 7a94add

Please sign in to comment.