mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: categories with non-ascii names will have broken next page urls
This commit is contained in:
parent
36cbd0d348
commit
ea86cfd4ef
3 changed files with 14 additions and 5 deletions
|
@ -150,6 +150,7 @@ describe Category do
|
|||
|
||||
it "creates a blank slug, this is OK." do
|
||||
category.slug.should be_blank
|
||||
category.slug_for_url.should == "#{category.id}-category"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -158,6 +159,7 @@ describe Category do
|
|||
|
||||
it 'creates a blank slug' do
|
||||
category.slug.should be_blank
|
||||
category.slug_for_url.should == "#{category.id}-category"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -169,6 +171,7 @@ describe Category do
|
|||
|
||||
it 'is created correctly' do
|
||||
@category.slug.should == 'amazing-category'
|
||||
@category.slug_for_url.should == @category.slug
|
||||
|
||||
@category.description.should be_blank
|
||||
|
||||
|
@ -204,7 +207,9 @@ describe Category do
|
|||
|
||||
describe "creating a new category with the same slug" do
|
||||
it "should have a blank slug" do
|
||||
Fabricate(:category, name: "Amazing Categóry").slug.should be_blank
|
||||
category = Fabricate(:category, name: "Amazing Categóry")
|
||||
category.slug.should be_blank
|
||||
category.slug_for_url.should == "#{category.id}-category"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue