BUGFIX: proper handling of top_menu_items

This commit is contained in:
Régis Hanol
2014-02-03 16:08:00 +01:00
parent 632cd44c2f
commit d2974c2a15
5 changed files with 77 additions and 85 deletions
+5 -5
View File
@@ -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) }