mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
BUGFIX: proper handling of top_menu_items
This commit is contained in:
@@ -58,7 +58,7 @@ describe ListController do
|
||||
|
||||
context 'with access to see the category' do
|
||||
before do
|
||||
xhr :get, :latest_category, category: category.slug
|
||||
xhr :get, :category_latest, category: category.slug
|
||||
end
|
||||
|
||||
it { should respond_with(:success) }
|
||||
@@ -66,7 +66,7 @@ describe ListController do
|
||||
|
||||
context 'with a link that includes an id' do
|
||||
before do
|
||||
xhr :get, :latest_category, category: "#{category.id}-#{category.slug}"
|
||||
xhr :get, :category_latest, category: "#{category.id}-#{category.slug}"
|
||||
end
|
||||
|
||||
it { should respond_with(:success) }
|
||||
@@ -77,7 +77,7 @@ describe ListController do
|
||||
let!(:other_category) { Fabricate(:category, name: "#{category.id} name") }
|
||||
|
||||
before do
|
||||
xhr :get, :latest_category, category: other_category.slug
|
||||
xhr :get, :category_latest, category: other_category.slug
|
||||
end
|
||||
|
||||
it { should respond_with(:success) }
|
||||
@@ -92,7 +92,7 @@ describe ListController do
|
||||
|
||||
context 'when parent and child are requested' do
|
||||
before do
|
||||
xhr :get, :latest_category, parent_category: category.slug, category: sub_category.slug
|
||||
xhr :get, :category_latest, parent_category: category.slug, category: sub_category.slug
|
||||
end
|
||||
|
||||
it { should respond_with(:success) }
|
||||
@@ -100,7 +100,7 @@ describe ListController do
|
||||
|
||||
context 'when child is requested with the wrong parent' do
|
||||
before do
|
||||
xhr :get, :latest_category, parent_category: 'not_the_right_slug', category: sub_category.slug
|
||||
xhr :get, :category_latest, parent_category: 'not_the_right_slug', category: sub_category.slug
|
||||
end
|
||||
|
||||
it { should_not respond_with(:success) }
|
||||
|
||||
Reference in New Issue
Block a user