mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Make category slugs lowercase (#11277)
Admins could specify category slug with upper case characters and same slug, but with different cases could be used simultaneously.
This commit is contained in:
@@ -29,14 +29,6 @@ describe CategoryHashtag do
|
||||
expect(Category.query_from_hashtag_slug("non-existent#{CategoryHashtag::SEPARATOR}#{parent_category.slug}")).to eq(nil)
|
||||
end
|
||||
|
||||
it "should be case sensitive" do
|
||||
parent_category.update!(slug: "ApPlE")
|
||||
child_category.update!(slug: "OraNGE")
|
||||
|
||||
expect(Category.query_from_hashtag_slug("apple")).to eq(nil)
|
||||
expect(Category.query_from_hashtag_slug("apple#{CategoryHashtag::SEPARATOR}orange")).to eq(nil)
|
||||
end
|
||||
|
||||
context "multi-level categories" do
|
||||
before do
|
||||
SiteSetting.max_category_nesting = 3
|
||||
|
||||
Reference in New Issue
Block a user