diff --git a/db/cms_fixtures/example.com/layouts/default/_default.yml b/db/cms_fixtures/example.com/layouts/default/_default.yml deleted file mode 100644 index 6f1626b7c0..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/_default.yml +++ /dev/null @@ -1 +0,0 @@ -label: Default Fixture Layout \ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/content.html b/db/cms_fixtures/example.com/layouts/default/content.html deleted file mode 100644 index f2707392b4..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/content.html +++ /dev/null @@ -1,5 +0,0 @@ - - - {{ cms:page:content }} - - \ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/css.css b/db/cms_fixtures/example.com/layouts/default/css.css deleted file mode 100644 index cd8b4f19df..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/css.css +++ /dev/null @@ -1 +0,0 @@ -body{color: red} \ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/js.js b/db/cms_fixtures/example.com/layouts/default/js.js deleted file mode 100644 index 6959d8bfc5..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/js.js +++ /dev/null @@ -1 +0,0 @@ -// default js \ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/nested/_nested.yml b/db/cms_fixtures/example.com/layouts/default/nested/_nested.yml deleted file mode 100644 index 754f082c41..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/nested/_nested.yml +++ /dev/null @@ -1,2 +0,0 @@ -label: Default Fixture Nested Layout -position: 42 \ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/nested/content.html b/db/cms_fixtures/example.com/layouts/default/nested/content.html deleted file mode 100644 index 350a3d016a..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/nested/content.html +++ /dev/null @@ -1,2 +0,0 @@ -
{{ cms:page:left }}
-
{{ cms:page:right }}
\ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/nested/css.css b/db/cms_fixtures/example.com/layouts/default/nested/css.css deleted file mode 100644 index 034f6fb9c2..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/nested/css.css +++ /dev/null @@ -1 +0,0 @@ -div{float:left} \ No newline at end of file diff --git a/db/cms_fixtures/example.com/layouts/default/nested/js.js b/db/cms_fixtures/example.com/layouts/default/nested/js.js deleted file mode 100644 index 2508c22ed6..0000000000 --- a/db/cms_fixtures/example.com/layouts/default/nested/js.js +++ /dev/null @@ -1 +0,0 @@ -// nested js \ No newline at end of file diff --git a/db/cms_fixtures/example.com/pages/index/_index.yml b/db/cms_fixtures/example.com/pages/index/_index.yml deleted file mode 100644 index 548e85356b..0000000000 --- a/db/cms_fixtures/example.com/pages/index/_index.yml +++ /dev/null @@ -1,2 +0,0 @@ -label: Home Fixture Page -layout: default \ No newline at end of file diff --git a/db/cms_fixtures/example.com/pages/index/child/_child.yml b/db/cms_fixtures/example.com/pages/index/child/_child.yml deleted file mode 100644 index d8602e1484..0000000000 --- a/db/cms_fixtures/example.com/pages/index/child/_child.yml +++ /dev/null @@ -1,3 +0,0 @@ -label: Child Fixture Page -layout: nested -position: 42 diff --git a/db/cms_fixtures/example.com/pages/index/child/left.html b/db/cms_fixtures/example.com/pages/index/child/left.html deleted file mode 100644 index 15beb8f985..0000000000 --- a/db/cms_fixtures/example.com/pages/index/child/left.html +++ /dev/null @@ -1 +0,0 @@ -Child Page Left Fixture Content \ No newline at end of file diff --git a/db/cms_fixtures/example.com/pages/index/child/right.html b/db/cms_fixtures/example.com/pages/index/child/right.html deleted file mode 100644 index 3ac08e9ab7..0000000000 --- a/db/cms_fixtures/example.com/pages/index/child/right.html +++ /dev/null @@ -1 +0,0 @@ -Child Page Right Fixture Content \ No newline at end of file diff --git a/db/cms_fixtures/example.com/pages/index/content.html b/db/cms_fixtures/example.com/pages/index/content.html deleted file mode 100644 index fb97a42a71..0000000000 --- a/db/cms_fixtures/example.com/pages/index/content.html +++ /dev/null @@ -1,2 +0,0 @@ -Home Page Fixture Contént -{{ cms:snippet:default }} \ No newline at end of file diff --git a/db/cms_fixtures/example.com/snippets/default/_default.yml b/db/cms_fixtures/example.com/snippets/default/_default.yml deleted file mode 100644 index 64cc262bd9..0000000000 --- a/db/cms_fixtures/example.com/snippets/default/_default.yml +++ /dev/null @@ -1 +0,0 @@ -label: Default Fixture Snippet \ No newline at end of file diff --git a/db/cms_fixtures/example.com/snippets/default/content.html b/db/cms_fixtures/example.com/snippets/default/content.html deleted file mode 100644 index 48a4995fa8..0000000000 --- a/db/cms_fixtures/example.com/snippets/default/content.html +++ /dev/null @@ -1 +0,0 @@ -Fixture Content for Default Snippet \ No newline at end of file diff --git a/spec/factories.rb b/spec/factories.rb index 06f5dbd879..3b0c548923 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -383,39 +383,3 @@ FactoryGirl.modify do end end end - - -# -- CMS -FactoryGirl.define do - factory :cms_site, :class => Cms::Site do - identifier 'open-food-network' - label 'Open Food Network' - hostname 'localhost' - end - - factory :cms_layout, :class => Cms::Layout do - site { Cms::Site.first || create(:cms_site) } - label 'layout' - identifier 'layout' - content '{{ cms:page:content:text }}' - end - - factory :cms_page, :class => Cms::Page do - site { Cms::Site.first || create(:cms_site) } - label 'page' - sequence(:slug) { |n| "page-#{n}" } - layout { Cms::Layout.first || create(:cms_layout) } - - # Pass content through to block, where it is stored - after(:create) do |cms_page, evaluator| - cms_page.blocks.first.update_attribute(:content, evaluator.content) - cms_page.save! # set_cached_content - end - end - - factory :cms_block, :class => Cms::Block do - page { Cms::Page.first || create(:cms_page) } - identifier 'block' - content 'hello, block' - end -end diff --git a/spec/features/admin/cms_spec.rb b/spec/features/admin/cms_spec.rb deleted file mode 100644 index c200bc57e4..0000000000 --- a/spec/features/admin/cms_spec.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'spec_helper' - -feature %q{ - In order to provide content to users of the site - As an administrator - I want to access the CMS admin site -} do - include AuthenticationWorkflow - include WebHelper - - scenario "admin can access CMS admin and return to Spree admin" do - login_to_admin_section - click_link 'Configuration' - click_link 'CMS Admin' - page.should have_content "ComfortableMexicanSofa" - - click_link 'Spree Admin' - expect(page).to have_current_path /^\/admin/ - end - - scenario "anonymous user can't access CMS admin", js: true do - visit cms_admin_path - page.should_not have_content "ComfortableMexicanSofa" - page.should have_content "Login" - end - - scenario "non-admin user can't access CMS admin", js: true do - login_to_consumer_section - page.should_not have_content "Login" - visit cms_admin_path - page.should_not have_content "ComfortableMexicanSofa" - expect(page).to have_current_path root_path - end -end diff --git a/spec/features/consumer/cms_spec.rb b/spec/features/consumer/cms_spec.rb deleted file mode 100644 index 0f25bc549c..0000000000 --- a/spec/features/consumer/cms_spec.rb +++ /dev/null @@ -1,68 +0,0 @@ -require 'spec_helper' - -feature %q{ - In order to learn about food - As a user of the site - I want to see static content pages -}, skip: true do - include AuthenticationWorkflow - include WebHelper - let(:d) { create(:distributor_enterprise, :name => 'Edible garden') } - - background do - create_enterprise_group_for d - end - - scenario "viewing shop front does not display home page content" do - # Given a CMS home page - create(:cms_page, content: 'Home page content') - - # When I visit the home page - visit spree.root_path - - # and proceed to the shop front - click_on 'Edible garden' - visit enterprise_path d - - # 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') - create(:cms_page, parent: home_page, label: 'One') - create(:cms_page, parent: home_page, label: 'Two') - create(:cms_page, parent: home_page, label: 'Three') - - # When I visit the home page - visit spree.root_path - # and proceed to the shop front - click_on "Edible garden" - visit enterprise_path d - - - # Then I should see a menu with these pages - page.should have_selector 'ul#main-nav-bar li', :text => 'One' - page.should have_selector 'ul#main-nav-bar li', :text => 'Two' - page.should have_selector 'ul#main-nav-bar li', :text => 'Three' - end - - scenario "viewing a page from the CMS menu" do - # Given some CMS pages - home_page = create(:cms_page, content: 'Home') - create(:cms_page, parent: home_page, label: 'One') - create(:cms_page, parent: home_page, label: 'Two', content: 'This is the page') - create(:cms_page, parent: home_page, label: 'Three') - - # When I go to one of the pages - visit spree.root_path - click_on "Edible garden" - visit enterprise_path d - click_link 'Two' - - # Then I should see the page - page.should have_content 'This is the page' - end - -end