Slugs should not have 'dot' in them.

This commit is contained in:
Mario Visic 2012-04-08 14:42:19 +08:00
parent 2798e15481
commit 22d55cf0e0
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ describe Locomotive::ContentEntry do
it 'removes dots' do
@content_entry.title = "my.test"; @content_entry.send(:set_slug)
@content_entry._permalink.should == 'my-dot-test'
@content_entry._permalink.should == 'my-test'
end
it 'accepts non-latin chars' do

View File

@ -102,11 +102,11 @@ describe Locomotive::Page do
it 'should have normalized slug' do
page = FactoryGirl.build(:page, :slug => ' Valid ité.html ')
page.valid?
page.slug.should == 'valid-ite-dot-html'
page.slug.should == 'valid-ite-html'
page = FactoryGirl.build(:page, :title => ' Valid ité.html ', :slug => nil, :site => page.site)
page.should be_valid
page.slug.should == 'valid-ite-dot-html'
page.slug.should == 'valid-ite-html'
end
it 'has no cache strategy' do