deluxe_publisher 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +29 -0
- data/LICENSE +20 -0
- data/README.rdoc +127 -0
- data/Rakefile +61 -0
- data/VERSION +1 -0
- data/app/controllers/deluxe_publisher/comments_controller.rb +93 -0
- data/app/controllers/deluxe_publisher/page_types_controller.rb +115 -0
- data/app/controllers/deluxe_publisher/pages_controller.rb +191 -0
- data/app/controllers/deluxe_publisher/presenter_controller.rb +185 -0
- data/app/controllers/deluxe_publisher/redirects_controller.rb +90 -0
- data/app/controllers/deluxe_publisher/sitemap_controller.rb +10 -0
- data/app/helpers/application_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/comments_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/page_types_helper.rb +13 -0
- data/app/helpers/deluxe_publisher/pages_helper.rb +41 -0
- data/app/helpers/deluxe_publisher/presenter_helper.rb +111 -0
- data/app/helpers/deluxe_publisher/redirects_helper.rb +2 -0
- data/app/helpers/deluxe_publisher/sitemap_helper.rb +2 -0
- data/app/models/ckeditor/asset.rb +88 -0
- data/app/models/ckeditor/attachment_file.rb +40 -0
- data/app/models/ckeditor/picture.rb +23 -0
- data/app/models/deluxe_publisher/comment.rb +6 -0
- data/app/models/deluxe_publisher/content.rb +6 -0
- data/app/models/deluxe_publisher/content_descriptor.rb +4 -0
- data/app/models/deluxe_publisher/page.rb +206 -0
- data/app/models/deluxe_publisher/page_type.rb +55 -0
- data/app/models/deluxe_publisher/redirect.rb +6 -0
- data/app/models/deluxe_publisher.rb +5 -0
- data/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
- data/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
- data/app/views/deluxe_publisher/comments/index.html.erb +31 -0
- data/app/views/deluxe_publisher/comments/new.html.erb +6 -0
- data/app/views/deluxe_publisher/comments/show.html.erb +30 -0
- data/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
- data/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
- data/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
- data/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
- data/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
- data/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
- data/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
- data/app/views/deluxe_publisher/pages/_form.html.erb +39 -0
- data/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
- data/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
- data/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
- data/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
- data/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
- data/app/views/deluxe_publisher/pages/edit.html.erb +5 -0
- data/app/views/deluxe_publisher/pages/index.html.erb +11 -0
- data/app/views/deluxe_publisher/pages/new.html.erb +6 -0
- data/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
- data/app/views/deluxe_publisher/pages/show.html.erb +115 -0
- data/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
- data/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
- data/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
- data/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
- data/app/views/deluxe_publisher/redirects/_form.html.erb +29 -0
- data/app/views/deluxe_publisher/redirects/edit.html.erb +6 -0
- data/app/views/deluxe_publisher/redirects/index.html.erb +27 -0
- data/app/views/deluxe_publisher/redirects/new.html.erb +5 -0
- data/app/views/deluxe_publisher/redirects/show.html.erb +20 -0
- data/app/views/deluxe_publisher/sitemap/index.xml.builder +12 -0
- data/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
- data/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
- data/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
- data/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
- data/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/layouts/deluxe_publisher.html.erb +36 -0
- data/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
- data/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
- data/config/routes.rb +49 -0
- data/deluxe_publisher.gemspec +466 -0
- data/lib/deluxe_publisher/deluxe_publisher_authentication.rb +37 -0
- data/lib/deluxe_publisher/engine.rb +5 -0
- data/lib/deluxe_publisher.rb +40 -0
- data/lib/generators/deluxe_publisher/base/USAGE +8 -0
- data/lib/generators/deluxe_publisher/base/base_generator.rb +45 -0
- data/lib/generators/deluxe_publisher/base/templates/images/add.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_addNewPage.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_cancel.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_preview.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/btn_save.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/bullet.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/content_bg.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/delete.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/edit.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/header_background.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/icon_published.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/icon_unpublished.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/logo.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/minus.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/plus.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/show.png +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/tab_bg.gif +0 -0
- data/lib/generators/deluxe_publisher/base/templates/images/tabs_bg.jpg +0 -0
- data/lib/generators/deluxe_publisher/base/templates/initializer.rb +23 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_presenter.js +25 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_publisher.js +86 -0
- data/lib/generators/deluxe_publisher/base/templates/javascripts/jquery-rails.js +158 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_blog.html.erb +74 -0
- data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_simple.html.erb +47 -0
- data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_presenter.css +458 -0
- data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_publisher.css +202 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.html.erb +19 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.rss.builder +23 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog_story.html.erb +12 -0
- data/lib/generators/deluxe_publisher/base/templates/templates/simple_page.html.erb +4 -0
- data/lib/generators/deluxe_publisher/migration/USAGE +0 -0
- data/lib/generators/deluxe_publisher/migration/migration_generator.rb +18 -0
- data/lib/generators/deluxe_publisher/migration/templates/migration.rb +98 -0
- data/lib/generators/deluxe_publisher/sample_site/sample_site_generator.rb +316 -0
- data/spec/controllers/deluxe_publisher/comments_controller_spec.rb +129 -0
- data/spec/controllers/deluxe_publisher/page_types_controller_spec.rb +125 -0
- data/spec/controllers/deluxe_publisher/pages_controller_spec.rb +129 -0
- data/spec/controllers/deluxe_publisher/presenter_controller_spec.rb +19 -0
- data/spec/controllers/deluxe_publisher/redirects_controller_spec.rb +118 -0
- data/spec/deluxe_publisher_spec.rb +7 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/index.html.erb +31 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/new.html.erb +6 -0
- data/spec/dummy/app/views/deluxe_publisher/comments/show.html.erb +30 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_form.html.erb +36 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/edit.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/index.html.erb +10 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/new.html.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/pages/show.html.erb +115 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
- data/spec/dummy/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
- data/spec/dummy/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
- data/spec/dummy/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
- data/spec/dummy/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher.html.erb +31 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
- data/spec/dummy/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
- data/spec/dummy/config/application.rb +45 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +22 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/deluxe_publisher.rb +23 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +104 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/migrate/20110405190943_create_deluxe_publisher.rb +135 -0
- data/spec/dummy/db/schema.rb +130 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/javascripts/controls.js +965 -0
- data/spec/dummy/public/javascripts/dragdrop.js +974 -0
- data/spec/dummy/public/javascripts/effects.js +1123 -0
- data/spec/dummy/public/javascripts/prototype.js +6001 -0
- data/spec/dummy/public/javascripts/rails.js +191 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/comment_factory.rb +4 -0
- data/spec/factories/content_descriptor_factory.rb +5 -0
- data/spec/factories/content_factory.rb +24 -0
- data/spec/factories/page_factory.rb +26 -0
- data/spec/factories/page_type_factory.rb +10 -0
- data/spec/factories/redirect_factory.rb +4 -0
- data/spec/helpers/deluxe_publisher/comments_helper_spec.rb +15 -0
- data/spec/helpers/deluxe_publisher/page_types_helper_spec.rb +26 -0
- data/spec/helpers/deluxe_publisher/pages_helper_spec.rb +65 -0
- data/spec/helpers/deluxe_publisher/presenter_helper_spec.rb +19 -0
- data/spec/helpers/deluxe_publisher/redirects_helper_spec.rb +15 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/models/deluxe_publisher/comment_spec.rb +5 -0
- data/spec/models/deluxe_publisher/content_descriptor_spec.rb +5 -0
- data/spec/models/deluxe_publisher/content_spec.rb +5 -0
- data/spec/models/deluxe_publisher/page_spec.rb +358 -0
- data/spec/models/deluxe_publisher/page_type_spec.rb +62 -0
- data/spec/models/deluxe_publisher/redirect_spec.rb +17 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_comments_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_page_types_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/deluxe_publisher_redirects_spec.rb +11 -0
- data/spec/requests/deluxe_publisher/pages_spec.rb +11 -0
- data/spec/routing/deluxe_publisher/comments_routing_spec.rb +35 -0
- data/spec/routing/deluxe_publisher/page_types_routing_spec.rb +47 -0
- data/spec/routing/deluxe_publisher/pages_routing_spec.rb +47 -0
- data/spec/routing/deluxe_publisher/presenter_routing_spec.rb +66 -0
- data/spec/routing/deluxe_publisher/redirects_routing_spec.rb +35 -0
- data/spec/spec_helper.rb +234 -0
- data/spec/views/deluxe_publisher/comments/edit.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/comments/index.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/comments/new.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/comments/show.html.erb_spec.rb +24 -0
- data/spec/views/deluxe_publisher/page_types/edit.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/page_types/index.html.erb_spec.rb +48 -0
- data/spec/views/deluxe_publisher/page_types/new.html.erb_spec.rb +32 -0
- data/spec/views/deluxe_publisher/page_types/show.html.erb_spec.rb +36 -0
- data/spec/views/deluxe_publisher/pages/edit.html.erb_spec.rb +58 -0
- data/spec/views/deluxe_publisher/pages/index.html.erb_spec.rb +100 -0
- data/spec/views/deluxe_publisher/pages/new.html.erb_spec.rb +81 -0
- data/spec/views/deluxe_publisher/pages/show.html.erb_spec.rb +75 -0
- data/spec/views/deluxe_publisher/presenter/present.html.erb_spec.rb +5 -0
- data/spec/views/deluxe_publisher/presenter/preview.html.erb_spec.rb +5 -0
- data/spec/views/deluxe_publisher/redirects/edit.html.erb_spec.rb +22 -0
- data/spec/views/deluxe_publisher/redirects/index.html.erb_spec.rb +28 -0
- data/spec/views/deluxe_publisher/redirects/new.html.erb_spec.rb +22 -0
- data/spec/views/deluxe_publisher/redirects/show.html.erb_spec.rb +21 -0
- metadata +1006 -0
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "deluxe_publisher/pages/index.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
assign(:pages, [
|
6
|
+
stub_model(Page,
|
7
|
+
:merchant_id => 1,
|
8
|
+
:parent_id => 1,
|
9
|
+
:alias_page_id => 1,
|
10
|
+
:page_type_id => 1,
|
11
|
+
:position => 1,
|
12
|
+
:footer_position => 1,
|
13
|
+
:browser_title => "Browser Title",
|
14
|
+
:page_title => "Page Title",
|
15
|
+
:menu_title => "Menu Title",
|
16
|
+
:file_name => "File Name",
|
17
|
+
:path => "Path",
|
18
|
+
:is_shown_in_main_navigation => false,
|
19
|
+
:is_shown_in_secondary_navigation => false,
|
20
|
+
:is_published => false,
|
21
|
+
:is_navigation_locked => false,
|
22
|
+
:is_content_locked => false,
|
23
|
+
:meta_keywords => "MyText",
|
24
|
+
:meta_description => "MyText",
|
25
|
+
:is_included_in_sitemap => false,
|
26
|
+
:sitemap_priority => 1.5,
|
27
|
+
:sitemap_change_freq => "Sitemap Change Freq"
|
28
|
+
),
|
29
|
+
stub_model(Page,
|
30
|
+
:merchant_id => 1,
|
31
|
+
:parent_id => 1,
|
32
|
+
:alias_page_id => 1,
|
33
|
+
:page_type_id => 1,
|
34
|
+
:position => 1,
|
35
|
+
:footer_position => 1,
|
36
|
+
:browser_title => "Browser Title",
|
37
|
+
:page_title => "Page Title",
|
38
|
+
:menu_title => "Menu Title",
|
39
|
+
:file_name => "File Name",
|
40
|
+
:path => "Path",
|
41
|
+
:is_shown_in_main_navigation => false,
|
42
|
+
:is_shown_in_secondary_navigation => false,
|
43
|
+
:is_published => false,
|
44
|
+
:is_navigation_locked => false,
|
45
|
+
:is_content_locked => false,
|
46
|
+
:meta_keywords => "MyText",
|
47
|
+
:meta_description => "MyText",
|
48
|
+
:is_included_in_sitemap => false,
|
49
|
+
:sitemap_priority => 1.5,
|
50
|
+
:sitemap_change_freq => "Sitemap Change Freq"
|
51
|
+
)
|
52
|
+
])
|
53
|
+
end
|
54
|
+
|
55
|
+
# it "renders a list of pages" do
|
56
|
+
# render
|
57
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
58
|
+
# assert_select "tr>td", :text => 1.to_s, :count => 2
|
59
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
60
|
+
# assert_select "tr>td", :text => 1.to_s, :count => 2
|
61
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
62
|
+
# assert_select "tr>td", :text => 1.to_s, :count => 2
|
63
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
64
|
+
# assert_select "tr>td", :text => 1.to_s, :count => 2
|
65
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
66
|
+
# assert_select "tr>td", :text => 1.to_s, :count => 2
|
67
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
68
|
+
# assert_select "tr>td", :text => 1.to_s, :count => 2
|
69
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
70
|
+
# assert_select "tr>td", :text => "Browser Title".to_s, :count => 2
|
71
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
72
|
+
# assert_select "tr>td", :text => "Page Title".to_s, :count => 2
|
73
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
74
|
+
# assert_select "tr>td", :text => "Menu Title".to_s, :count => 2
|
75
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
76
|
+
# assert_select "tr>td", :text => "File Name".to_s, :count => 2
|
77
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
78
|
+
# assert_select "tr>td", :text => "Path".to_s, :count => 2
|
79
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
80
|
+
# assert_select "tr>td", :text => false.to_s, :count => 2
|
81
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
82
|
+
# assert_select "tr>td", :text => false.to_s, :count => 2
|
83
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
84
|
+
# assert_select "tr>td", :text => false.to_s, :count => 2
|
85
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
86
|
+
# assert_select "tr>td", :text => false.to_s, :count => 2
|
87
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
88
|
+
# assert_select "tr>td", :text => false.to_s, :count => 2
|
89
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
90
|
+
# assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
91
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
92
|
+
# assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
93
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
94
|
+
# assert_select "tr>td", :text => false.to_s, :count => 2
|
95
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
96
|
+
# assert_select "tr>td", :text => 1.5.to_s, :count => 2
|
97
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
98
|
+
# assert_select "tr>td", :text => "Sitemap Change Freq".to_s, :count => 2
|
99
|
+
# end
|
100
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "/deluxe_publisher/pages/new.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
assign(:page, DeluxePublisher::Page.new({:merchant_id => 1,
|
6
|
+
:parent_id => 1,
|
7
|
+
:alias_page_id => 1,
|
8
|
+
:page_type_id => 1,
|
9
|
+
:position => 1,
|
10
|
+
:footer_position => 1,
|
11
|
+
:browser_title => "MyString",
|
12
|
+
:page_title => "MyString",
|
13
|
+
:menu_title => "MyString",
|
14
|
+
:file_name => "MyString",
|
15
|
+
:path => "MyString",
|
16
|
+
:is_shown_in_main_navigation => false,
|
17
|
+
:is_shown_in_secondary_navigation => false,
|
18
|
+
:is_published => false,
|
19
|
+
:is_navigation_locked => false,
|
20
|
+
:is_content_locked => false,
|
21
|
+
:meta_keywords => "MyText",
|
22
|
+
:meta_description => "MyText",
|
23
|
+
:is_included_in_sitemap => false,
|
24
|
+
:sitemap_priority => 1.5,
|
25
|
+
:sitemap_change_freq => "MyString"}))
|
26
|
+
|
27
|
+
# assign(:page, stub_model(DeluxePublisher::Page,
|
28
|
+
# :merchant_id => 1,
|
29
|
+
# :parent_id => 1,
|
30
|
+
# :alias_page_id => 1,
|
31
|
+
# :page_type_id => 1,
|
32
|
+
# :position => 1,
|
33
|
+
# :footer_position => 1,
|
34
|
+
# :browser_title => "MyString",
|
35
|
+
# :page_title => "MyString",
|
36
|
+
# :menu_title => "MyString",
|
37
|
+
# :file_name => "MyString",
|
38
|
+
# :path => "MyString",
|
39
|
+
# :is_shown_in_main_navigation => false,
|
40
|
+
# :is_shown_in_secondary_navigation => false,
|
41
|
+
# :is_published => false,
|
42
|
+
# :is_navigation_locked => false,
|
43
|
+
# :is_content_locked => false,
|
44
|
+
# :meta_keywords => "MyText",
|
45
|
+
# :meta_description => "MyText",
|
46
|
+
# :is_included_in_sitemap => false,
|
47
|
+
# :sitemap_priority => 1.5,
|
48
|
+
# :sitemap_change_freq => "MyString"
|
49
|
+
# ).as_new_record)
|
50
|
+
end
|
51
|
+
|
52
|
+
# it "renders new page form" do
|
53
|
+
# render(:template => "/deluxe_publisher/pages/new")
|
54
|
+
#
|
55
|
+
# rendered.should eql("bob")
|
56
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
57
|
+
# assert_select "form", :action => deluxe_publisher_pages_path, :method => "post" do
|
58
|
+
# assert_select "input#page_merchant_id", :name => "page[merchant_id]"
|
59
|
+
# assert_select "input#page_parent_id", :name => "page[parent_id]"
|
60
|
+
# assert_select "input#page_alias_page_id", :name => "page[alias_page_id]"
|
61
|
+
# assert_select "input#page_page_type_id", :name => "page[page_type_id]"
|
62
|
+
# assert_select "input#page_position", :name => "page[position]"
|
63
|
+
# assert_select "input#page_footer_position", :name => "page[footer_position]"
|
64
|
+
# assert_select "input#page_browser_title", :name => "page[browser_title]"
|
65
|
+
# assert_select "input#page_page_title", :name => "page[page_title]"
|
66
|
+
# assert_select "input#page_menu_title", :name => "page[menu_title]"
|
67
|
+
# assert_select "input#page_file_name", :name => "page[file_name]"
|
68
|
+
# assert_select "input#page_path", :name => "page[path]"
|
69
|
+
# assert_select "input#page_is_shown_in_main_navigation", :name => "page[is_shown_in_main_navigation]"
|
70
|
+
# assert_select "input#page_is_shown_in_secondary_navigation", :name => "page[is_shown_in_secondary_navigation]"
|
71
|
+
# assert_select "input#page_is_published", :name => "page[is_published]"
|
72
|
+
# assert_select "input#page_is_navigation_locked", :name => "page[is_navigation_locked]"
|
73
|
+
# assert_select "input#page_is_content_locked", :name => "page[is_content_locked]"
|
74
|
+
# assert_select "textarea#page_meta_keywords", :name => "page[meta_keywords]"
|
75
|
+
# assert_select "textarea#page_meta_description", :name => "page[meta_description]"
|
76
|
+
# assert_select "input#page_is_included_in_sitemap", :name => "page[is_included_in_sitemap]"
|
77
|
+
# assert_select "input#page_sitemap_priority", :name => "page[sitemap_priority]"
|
78
|
+
# assert_select "input#page_sitemap_change_freq", :name => "page[sitemap_change_freq]"
|
79
|
+
# end
|
80
|
+
# end
|
81
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "deluxe_publisher/pages/show.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
@page = assign(:page, stub_model(DeluxePublisher::Page,
|
6
|
+
:merchant_id => 1,
|
7
|
+
:parent_id => 1,
|
8
|
+
:alias_page_id => 1,
|
9
|
+
:page_type_id => 1,
|
10
|
+
:position => 1,
|
11
|
+
:footer_position => 1,
|
12
|
+
:browser_title => "Browser Title",
|
13
|
+
:page_title => "Page Title",
|
14
|
+
:menu_title => "Menu Title",
|
15
|
+
:file_name => "File Name",
|
16
|
+
:path => "Path",
|
17
|
+
:is_shown_in_main_navigation => false,
|
18
|
+
:is_shown_in_secondary_navigation => false,
|
19
|
+
:is_published => false,
|
20
|
+
:is_navigation_locked => false,
|
21
|
+
:is_content_locked => false,
|
22
|
+
:meta_keywords => "MyText",
|
23
|
+
:meta_description => "MyText",
|
24
|
+
:is_included_in_sitemap => false,
|
25
|
+
:sitemap_priority => 1.5,
|
26
|
+
:sitemap_change_freq => "Sitemap Change Freq"
|
27
|
+
))
|
28
|
+
end
|
29
|
+
|
30
|
+
# it "renders attributes in <p>" do
|
31
|
+
# render
|
32
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
33
|
+
# rendered.should match(/1/)
|
34
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
35
|
+
# rendered.should match(/1/)
|
36
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
37
|
+
# rendered.should match(/1/)
|
38
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
39
|
+
# rendered.should match(/1/)
|
40
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
41
|
+
# rendered.should match(/1/)
|
42
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
43
|
+
# rendered.should match(/1/)
|
44
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
45
|
+
# rendered.should match(/Browser Title/)
|
46
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
47
|
+
# rendered.should match(/Page Title/)
|
48
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
49
|
+
# rendered.should match(/Menu Title/)
|
50
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
51
|
+
# rendered.should match(/File Name/)
|
52
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
53
|
+
# rendered.should match(/Path/)
|
54
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
55
|
+
# rendered.should match(/false/)
|
56
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
57
|
+
# rendered.should match(/false/)
|
58
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
59
|
+
# rendered.should match(/false/)
|
60
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
61
|
+
# rendered.should match(/false/)
|
62
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
63
|
+
# rendered.should match(/false/)
|
64
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
65
|
+
# rendered.should match(/MyText/)
|
66
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
67
|
+
# rendered.should match(/MyText/)
|
68
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
69
|
+
# rendered.should match(/false/)
|
70
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
71
|
+
# rendered.should match(/1.5/)
|
72
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
73
|
+
# rendered.should match(/Sitemap Change Freq/)
|
74
|
+
# end
|
75
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "deluxe_publisher_redirects/edit.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
@redirect = assign(:redirect, stub_model(DeluxePublisher::Redirect,
|
6
|
+
:incoming_url => "MyString",
|
7
|
+
:direct_to_url => "MyString",
|
8
|
+
:description => "MyText"
|
9
|
+
))
|
10
|
+
end
|
11
|
+
|
12
|
+
pending "renders the edit redirect form" do
|
13
|
+
render
|
14
|
+
|
15
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
16
|
+
assert_select "form", :action => deluxe_publisher_redirects_path(@redirect), :method => "post" do
|
17
|
+
assert_select "input#redirect_incoming_url", :name => "redirect[incoming_url]"
|
18
|
+
assert_select "input#redirect_direct_to_url", :name => "redirect[direct_to_url]"
|
19
|
+
assert_select "textarea#redirect_description", :name => "redirect[description]"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "deluxe_publisher/redirects/index.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
assign(:deluxe_publisher_redirects, [
|
6
|
+
stub_model(DeluxePublisher::Redirect,
|
7
|
+
:incoming_url => "Incoming Url",
|
8
|
+
:direct_to_url => "Direct To Url",
|
9
|
+
:description => "MyText"
|
10
|
+
),
|
11
|
+
stub_model(DeluxePublisher::Redirect,
|
12
|
+
:incoming_url => "Incoming Url",
|
13
|
+
:direct_to_url => "Direct To Url",
|
14
|
+
:description => "MyText"
|
15
|
+
)
|
16
|
+
])
|
17
|
+
end
|
18
|
+
|
19
|
+
it "renders a list of deluxe_publisher_redirects" do
|
20
|
+
render
|
21
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
22
|
+
assert_select "tr>td", :text => "Incoming Url".to_s, :count => 2
|
23
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
24
|
+
assert_select "tr>td", :text => "Direct To Url".to_s, :count => 2
|
25
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
26
|
+
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "deluxe_publisher_redirects/new.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
assign(:redirect, stub_model(DeluxePublisher::Redirect,
|
6
|
+
:incoming_url => "MyString",
|
7
|
+
:direct_to_url => "MyString",
|
8
|
+
:description => "MyText"
|
9
|
+
).as_new_record)
|
10
|
+
end
|
11
|
+
|
12
|
+
pending "renders new redirect form" do
|
13
|
+
render
|
14
|
+
|
15
|
+
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
16
|
+
assert_select "form", :action => deluxe_publisher_redirects_path, :method => "post" do
|
17
|
+
assert_select "input#redirect_incoming_url", :name => "redirect[incoming_url]"
|
18
|
+
assert_select "input#redirect_direct_to_url", :name => "redirect[direct_to_url]"
|
19
|
+
assert_select "textarea#redirect_description", :name => "redirect[description]"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "deluxe_publisher/redirects/show.html.erb" do
|
4
|
+
before(:each) do
|
5
|
+
@redirect = assign(:redirect, stub_model(DeluxePublisher::Redirect,
|
6
|
+
:incoming_url => "Incoming Url",
|
7
|
+
:direct_to_url => "Direct To Url",
|
8
|
+
:description => "MyText"
|
9
|
+
))
|
10
|
+
end
|
11
|
+
|
12
|
+
# it "renders attributes in <p>" do
|
13
|
+
# render
|
14
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
15
|
+
# rendered.should match(/Incoming Url/)
|
16
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
17
|
+
# rendered.should match(/Direct To Url/)
|
18
|
+
# # Run the generator again with the --webrat flag if you want to use webrat matchers
|
19
|
+
# rendered.should match(/MyText/)
|
20
|
+
# end
|
21
|
+
end
|