deluxe_publisher 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +29 -0
  4. data/LICENSE +20 -0
  5. data/README.rdoc +127 -0
  6. data/Rakefile +61 -0
  7. data/VERSION +1 -0
  8. data/app/controllers/deluxe_publisher/comments_controller.rb +93 -0
  9. data/app/controllers/deluxe_publisher/page_types_controller.rb +115 -0
  10. data/app/controllers/deluxe_publisher/pages_controller.rb +191 -0
  11. data/app/controllers/deluxe_publisher/presenter_controller.rb +185 -0
  12. data/app/controllers/deluxe_publisher/redirects_controller.rb +90 -0
  13. data/app/controllers/deluxe_publisher/sitemap_controller.rb +10 -0
  14. data/app/helpers/application_helper.rb +2 -0
  15. data/app/helpers/deluxe_publisher/comments_helper.rb +2 -0
  16. data/app/helpers/deluxe_publisher/page_types_helper.rb +13 -0
  17. data/app/helpers/deluxe_publisher/pages_helper.rb +41 -0
  18. data/app/helpers/deluxe_publisher/presenter_helper.rb +111 -0
  19. data/app/helpers/deluxe_publisher/redirects_helper.rb +2 -0
  20. data/app/helpers/deluxe_publisher/sitemap_helper.rb +2 -0
  21. data/app/models/ckeditor/asset.rb +88 -0
  22. data/app/models/ckeditor/attachment_file.rb +40 -0
  23. data/app/models/ckeditor/picture.rb +23 -0
  24. data/app/models/deluxe_publisher/comment.rb +6 -0
  25. data/app/models/deluxe_publisher/content.rb +6 -0
  26. data/app/models/deluxe_publisher/content_descriptor.rb +4 -0
  27. data/app/models/deluxe_publisher/page.rb +206 -0
  28. data/app/models/deluxe_publisher/page_type.rb +55 -0
  29. data/app/models/deluxe_publisher/redirect.rb +6 -0
  30. data/app/models/deluxe_publisher.rb +5 -0
  31. data/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
  32. data/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
  33. data/app/views/deluxe_publisher/comments/index.html.erb +31 -0
  34. data/app/views/deluxe_publisher/comments/new.html.erb +6 -0
  35. data/app/views/deluxe_publisher/comments/show.html.erb +30 -0
  36. data/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
  37. data/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
  38. data/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
  39. data/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
  40. data/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
  41. data/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
  42. data/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
  43. data/app/views/deluxe_publisher/pages/_form.html.erb +39 -0
  44. data/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
  45. data/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
  46. data/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
  47. data/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
  48. data/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
  49. data/app/views/deluxe_publisher/pages/edit.html.erb +5 -0
  50. data/app/views/deluxe_publisher/pages/index.html.erb +11 -0
  51. data/app/views/deluxe_publisher/pages/new.html.erb +6 -0
  52. data/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
  53. data/app/views/deluxe_publisher/pages/show.html.erb +115 -0
  54. data/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
  55. data/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
  56. data/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
  57. data/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
  58. data/app/views/deluxe_publisher/redirects/_form.html.erb +29 -0
  59. data/app/views/deluxe_publisher/redirects/edit.html.erb +6 -0
  60. data/app/views/deluxe_publisher/redirects/index.html.erb +27 -0
  61. data/app/views/deluxe_publisher/redirects/new.html.erb +5 -0
  62. data/app/views/deluxe_publisher/redirects/show.html.erb +20 -0
  63. data/app/views/deluxe_publisher/sitemap/index.xml.builder +12 -0
  64. data/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
  65. data/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
  66. data/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
  67. data/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
  68. data/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
  69. data/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
  70. data/app/views/layouts/application.html.erb +14 -0
  71. data/app/views/layouts/deluxe_publisher.html.erb +36 -0
  72. data/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
  73. data/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
  74. data/config/routes.rb +49 -0
  75. data/deluxe_publisher.gemspec +466 -0
  76. data/lib/deluxe_publisher/deluxe_publisher_authentication.rb +37 -0
  77. data/lib/deluxe_publisher/engine.rb +5 -0
  78. data/lib/deluxe_publisher.rb +40 -0
  79. data/lib/generators/deluxe_publisher/base/USAGE +8 -0
  80. data/lib/generators/deluxe_publisher/base/base_generator.rb +45 -0
  81. data/lib/generators/deluxe_publisher/base/templates/images/add.png +0 -0
  82. data/lib/generators/deluxe_publisher/base/templates/images/btn_addNewPage.gif +0 -0
  83. data/lib/generators/deluxe_publisher/base/templates/images/btn_cancel.gif +0 -0
  84. data/lib/generators/deluxe_publisher/base/templates/images/btn_preview.gif +0 -0
  85. data/lib/generators/deluxe_publisher/base/templates/images/btn_save.gif +0 -0
  86. data/lib/generators/deluxe_publisher/base/templates/images/bullet.gif +0 -0
  87. data/lib/generators/deluxe_publisher/base/templates/images/content_bg.jpg +0 -0
  88. data/lib/generators/deluxe_publisher/base/templates/images/delete.png +0 -0
  89. data/lib/generators/deluxe_publisher/base/templates/images/edit.png +0 -0
  90. data/lib/generators/deluxe_publisher/base/templates/images/header_background.jpg +0 -0
  91. data/lib/generators/deluxe_publisher/base/templates/images/icon_published.gif +0 -0
  92. data/lib/generators/deluxe_publisher/base/templates/images/icon_unpublished.gif +0 -0
  93. data/lib/generators/deluxe_publisher/base/templates/images/logo.gif +0 -0
  94. data/lib/generators/deluxe_publisher/base/templates/images/minus.gif +0 -0
  95. data/lib/generators/deluxe_publisher/base/templates/images/plus.gif +0 -0
  96. data/lib/generators/deluxe_publisher/base/templates/images/show.png +0 -0
  97. data/lib/generators/deluxe_publisher/base/templates/images/tab_bg.gif +0 -0
  98. data/lib/generators/deluxe_publisher/base/templates/images/tabs_bg.jpg +0 -0
  99. data/lib/generators/deluxe_publisher/base/templates/initializer.rb +23 -0
  100. data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_presenter.js +25 -0
  101. data/lib/generators/deluxe_publisher/base/templates/javascripts/deluxe_publisher.js +86 -0
  102. data/lib/generators/deluxe_publisher/base/templates/javascripts/jquery-rails.js +158 -0
  103. data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
  104. data/lib/generators/deluxe_publisher/base/templates/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
  105. data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_blog.html.erb +74 -0
  106. data/lib/generators/deluxe_publisher/base/templates/layouts/deluxe_publisher_simple.html.erb +47 -0
  107. data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_presenter.css +458 -0
  108. data/lib/generators/deluxe_publisher/base/templates/stylesheets/deluxe_publisher.css +202 -0
  109. data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.html.erb +19 -0
  110. data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog.rss.builder +23 -0
  111. data/lib/generators/deluxe_publisher/base/templates/templates/simple_blog_story.html.erb +12 -0
  112. data/lib/generators/deluxe_publisher/base/templates/templates/simple_page.html.erb +4 -0
  113. data/lib/generators/deluxe_publisher/migration/USAGE +0 -0
  114. data/lib/generators/deluxe_publisher/migration/migration_generator.rb +18 -0
  115. data/lib/generators/deluxe_publisher/migration/templates/migration.rb +98 -0
  116. data/lib/generators/deluxe_publisher/sample_site/sample_site_generator.rb +316 -0
  117. data/spec/controllers/deluxe_publisher/comments_controller_spec.rb +129 -0
  118. data/spec/controllers/deluxe_publisher/page_types_controller_spec.rb +125 -0
  119. data/spec/controllers/deluxe_publisher/pages_controller_spec.rb +129 -0
  120. data/spec/controllers/deluxe_publisher/presenter_controller_spec.rb +19 -0
  121. data/spec/controllers/deluxe_publisher/redirects_controller_spec.rb +118 -0
  122. data/spec/deluxe_publisher_spec.rb +7 -0
  123. data/spec/dummy/Rakefile +7 -0
  124. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  125. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  126. data/spec/dummy/app/views/deluxe_publisher/comments/_form.html.erb +31 -0
  127. data/spec/dummy/app/views/deluxe_publisher/comments/edit.html.erb +6 -0
  128. data/spec/dummy/app/views/deluxe_publisher/comments/index.html.erb +31 -0
  129. data/spec/dummy/app/views/deluxe_publisher/comments/new.html.erb +6 -0
  130. data/spec/dummy/app/views/deluxe_publisher/comments/show.html.erb +30 -0
  131. data/spec/dummy/app/views/deluxe_publisher/page_types/_content_descriptors.html.erb +15 -0
  132. data/spec/dummy/app/views/deluxe_publisher/page_types/_form.html.erb +59 -0
  133. data/spec/dummy/app/views/deluxe_publisher/page_types/content_areas_change.js.erb +3 -0
  134. data/spec/dummy/app/views/deluxe_publisher/page_types/edit.html.erb +8 -0
  135. data/spec/dummy/app/views/deluxe_publisher/page_types/index.html.erb +29 -0
  136. data/spec/dummy/app/views/deluxe_publisher/page_types/new.html.erb +7 -0
  137. data/spec/dummy/app/views/deluxe_publisher/page_types/show.html.erb +45 -0
  138. data/spec/dummy/app/views/deluxe_publisher/pages/_form.html.erb +36 -0
  139. data/spec/dummy/app/views/deluxe_publisher/pages/_general.html.erb +108 -0
  140. data/spec/dummy/app/views/deluxe_publisher/pages/_page.html.erb +23 -0
  141. data/spec/dummy/app/views/deluxe_publisher/pages/_page_content.html.erb +16 -0
  142. data/spec/dummy/app/views/deluxe_publisher/pages/_page_links.html.erb +9 -0
  143. data/spec/dummy/app/views/deluxe_publisher/pages/_seo.html.erb +27 -0
  144. data/spec/dummy/app/views/deluxe_publisher/pages/edit.html.erb +7 -0
  145. data/spec/dummy/app/views/deluxe_publisher/pages/index.html.erb +10 -0
  146. data/spec/dummy/app/views/deluxe_publisher/pages/new.html.erb +7 -0
  147. data/spec/dummy/app/views/deluxe_publisher/pages/page_type_change.js.erb +3 -0
  148. data/spec/dummy/app/views/deluxe_publisher/pages/show.html.erb +115 -0
  149. data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment.js.erb +3 -0
  150. data/spec/dummy/app/views/deluxe_publisher/presenter/create_comment_failed.js.erb +1 -0
  151. data/spec/dummy/app/views/deluxe_publisher/presenter/new_comment.js.erb +7 -0
  152. data/spec/dummy/app/views/deluxe_publisher/presenter/preview.html.erb +2 -0
  153. data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.html.erb +19 -0
  154. data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog.rss.builder +23 -0
  155. data/spec/dummy/app/views/deluxe_publisher/templates/simple_blog_story.html.erb +9 -0
  156. data/spec/dummy/app/views/deluxe_publisher/templates/simple_page.html.erb +4 -0
  157. data/spec/dummy/app/views/layouts/_deluxe_publisher_comment_form.html.erb +29 -0
  158. data/spec/dummy/app/views/layouts/_deluxe_publisher_comments_list.html.erb +8 -0
  159. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  160. data/spec/dummy/app/views/layouts/deluxe_publisher.html.erb +31 -0
  161. data/spec/dummy/app/views/layouts/deluxe_publisher_blog.html.erb +63 -0
  162. data/spec/dummy/app/views/layouts/deluxe_publisher_simple.html.erb +30 -0
  163. data/spec/dummy/config/application.rb +45 -0
  164. data/spec/dummy/config/boot.rb +10 -0
  165. data/spec/dummy/config/database.yml +22 -0
  166. data/spec/dummy/config/environment.rb +5 -0
  167. data/spec/dummy/config/environments/development.rb +26 -0
  168. data/spec/dummy/config/environments/production.rb +49 -0
  169. data/spec/dummy/config/environments/test.rb +35 -0
  170. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  171. data/spec/dummy/config/initializers/deluxe_publisher.rb +23 -0
  172. data/spec/dummy/config/initializers/inflections.rb +10 -0
  173. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  174. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  175. data/spec/dummy/config/initializers/session_store.rb +8 -0
  176. data/spec/dummy/config/locales/en.yml +5 -0
  177. data/spec/dummy/config/routes.rb +104 -0
  178. data/spec/dummy/config.ru +4 -0
  179. data/spec/dummy/db/migrate/20110405190943_create_deluxe_publisher.rb +135 -0
  180. data/spec/dummy/db/schema.rb +130 -0
  181. data/spec/dummy/public/404.html +26 -0
  182. data/spec/dummy/public/422.html +26 -0
  183. data/spec/dummy/public/500.html +26 -0
  184. data/spec/dummy/public/favicon.ico +0 -0
  185. data/spec/dummy/public/javascripts/application.js +2 -0
  186. data/spec/dummy/public/javascripts/controls.js +965 -0
  187. data/spec/dummy/public/javascripts/dragdrop.js +974 -0
  188. data/spec/dummy/public/javascripts/effects.js +1123 -0
  189. data/spec/dummy/public/javascripts/prototype.js +6001 -0
  190. data/spec/dummy/public/javascripts/rails.js +191 -0
  191. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  192. data/spec/dummy/script/rails +6 -0
  193. data/spec/factories/comment_factory.rb +4 -0
  194. data/spec/factories/content_descriptor_factory.rb +5 -0
  195. data/spec/factories/content_factory.rb +24 -0
  196. data/spec/factories/page_factory.rb +26 -0
  197. data/spec/factories/page_type_factory.rb +10 -0
  198. data/spec/factories/redirect_factory.rb +4 -0
  199. data/spec/helpers/deluxe_publisher/comments_helper_spec.rb +15 -0
  200. data/spec/helpers/deluxe_publisher/page_types_helper_spec.rb +26 -0
  201. data/spec/helpers/deluxe_publisher/pages_helper_spec.rb +65 -0
  202. data/spec/helpers/deluxe_publisher/presenter_helper_spec.rb +19 -0
  203. data/spec/helpers/deluxe_publisher/redirects_helper_spec.rb +15 -0
  204. data/spec/integration/navigation_spec.rb +9 -0
  205. data/spec/models/deluxe_publisher/comment_spec.rb +5 -0
  206. data/spec/models/deluxe_publisher/content_descriptor_spec.rb +5 -0
  207. data/spec/models/deluxe_publisher/content_spec.rb +5 -0
  208. data/spec/models/deluxe_publisher/page_spec.rb +358 -0
  209. data/spec/models/deluxe_publisher/page_type_spec.rb +62 -0
  210. data/spec/models/deluxe_publisher/redirect_spec.rb +17 -0
  211. data/spec/requests/deluxe_publisher/deluxe_publisher_comments_spec.rb +11 -0
  212. data/spec/requests/deluxe_publisher/deluxe_publisher_page_types_spec.rb +11 -0
  213. data/spec/requests/deluxe_publisher/deluxe_publisher_redirects_spec.rb +11 -0
  214. data/spec/requests/deluxe_publisher/pages_spec.rb +11 -0
  215. data/spec/routing/deluxe_publisher/comments_routing_spec.rb +35 -0
  216. data/spec/routing/deluxe_publisher/page_types_routing_spec.rb +47 -0
  217. data/spec/routing/deluxe_publisher/pages_routing_spec.rb +47 -0
  218. data/spec/routing/deluxe_publisher/presenter_routing_spec.rb +66 -0
  219. data/spec/routing/deluxe_publisher/redirects_routing_spec.rb +35 -0
  220. data/spec/spec_helper.rb +234 -0
  221. data/spec/views/deluxe_publisher/comments/edit.html.erb_spec.rb +24 -0
  222. data/spec/views/deluxe_publisher/comments/index.html.erb_spec.rb +32 -0
  223. data/spec/views/deluxe_publisher/comments/new.html.erb_spec.rb +24 -0
  224. data/spec/views/deluxe_publisher/comments/show.html.erb_spec.rb +24 -0
  225. data/spec/views/deluxe_publisher/page_types/edit.html.erb_spec.rb +32 -0
  226. data/spec/views/deluxe_publisher/page_types/index.html.erb_spec.rb +48 -0
  227. data/spec/views/deluxe_publisher/page_types/new.html.erb_spec.rb +32 -0
  228. data/spec/views/deluxe_publisher/page_types/show.html.erb_spec.rb +36 -0
  229. data/spec/views/deluxe_publisher/pages/edit.html.erb_spec.rb +58 -0
  230. data/spec/views/deluxe_publisher/pages/index.html.erb_spec.rb +100 -0
  231. data/spec/views/deluxe_publisher/pages/new.html.erb_spec.rb +81 -0
  232. data/spec/views/deluxe_publisher/pages/show.html.erb_spec.rb +75 -0
  233. data/spec/views/deluxe_publisher/presenter/present.html.erb_spec.rb +5 -0
  234. data/spec/views/deluxe_publisher/presenter/preview.html.erb_spec.rb +5 -0
  235. data/spec/views/deluxe_publisher/redirects/edit.html.erb_spec.rb +22 -0
  236. data/spec/views/deluxe_publisher/redirects/index.html.erb_spec.rb +28 -0
  237. data/spec/views/deluxe_publisher/redirects/new.html.erb_spec.rb +22 -0
  238. data/spec/views/deluxe_publisher/redirects/show.html.erb_spec.rb +21 -0
  239. 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,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "presenter/present.html.erb" do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ describe "presenter/preview.html.erb" do
4
+ pending "add some examples to (or delete) #{__FILE__}"
5
+ 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