There was an error while loading. Please reload this page.
1 parent ac0c0c7 commit a64c7feCopy full SHA for a64c7fe
test/unit/models/page_test.rb
@@ -45,6 +45,16 @@ def test_creating_page_with_reserved_path
45
assert_valid @page
46
end
47
48
+ def test_creating_page_with_trailing_slash
49
+ @page = Factory.build(:page, :path => "/slashed/")
50
+ @page.save
51
+ assert_equal @page.path, "/slashed"
52
+
53
+ @page = Factory.build(:page, :path => "/slashed/loooong/path/")
54
55
+ assert_equal @page.path, "/slashed/loooong/path"
56
+ end
57
58
def test_find_live_by_path
59
@page = Factory.build(:page, :path => '/foo')
60
assert_nil Page.find_live_by_path('/foo')
0 commit comments