mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Viewing another products listing page does not display home page content
This commit is contained in:
@@ -1,2 +1,7 @@
|
||||
module ApplicationHelper
|
||||
def home_page_cms_content
|
||||
if controller.controller_name == 'home' && controller.action_name == 'index'
|
||||
cms_page_content(:content, Cms::Page.find_by_full_path('/'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
= cms_page_content(:content, Cms::Page.find_by_full_path('/'))
|
||||
= home_page_cms_content
|
||||
|
||||
- if @products
|
||||
#products= render 'spree/shared/products', :products => @products, :taxon => @taxon
|
||||
|
||||
@@ -20,6 +20,18 @@ feature %q{
|
||||
page.should have_content 'Home page content'
|
||||
end
|
||||
|
||||
scenario "viewing another products listing page does not display home page content" do
|
||||
# Given a CMS home page
|
||||
create(:cms_page, content: 'Home page content')
|
||||
|
||||
# When I visit a products listing page
|
||||
visit spree.products_path
|
||||
|
||||
# Then I should not see the home page content
|
||||
page.should_not have_content 'Home page content'
|
||||
end
|
||||
|
||||
|
||||
scenario "viewing the menu of CMS pages" do
|
||||
# Given some CMS pages
|
||||
home_page = create(:cms_page, content: 'Home')
|
||||
|
||||
Reference in New Issue
Block a user