comfortable_mexican_sofa 1.12.9 → 1.12.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +11 -6
  3. data/Gemfile +6 -3
  4. data/LICENSE +1 -1
  5. data/README.md +4 -5
  6. data/Rakefile +1 -0
  7. data/app/assets/javascripts/comfy/admin/cms/base.js.coffee +3 -3
  8. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ar.js +76 -0
  9. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/az.js +75 -0
  10. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ba.js +79 -0
  11. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/bg.js +77 -0
  12. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/by.js +77 -0
  13. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ca.js +75 -0
  14. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/cs.js +2 -1
  15. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/da.js +2 -1
  16. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/de.js +2 -1
  17. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/el.js +76 -0
  18. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/en.js +75 -0
  19. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/eo.js +76 -0
  20. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/es.js +2 -1
  21. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/es_AR.js +76 -0
  22. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/fa.js +76 -0
  23. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/fi.js +75 -0
  24. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/fr.js +2 -1
  25. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ge.js +75 -0
  26. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/he.js +75 -0
  27. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/hr.js +76 -0
  28. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/hu.js +77 -0
  29. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/id.js +76 -0
  30. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/it.js +2 -1
  31. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ja.js +2 -1
  32. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/kn.js +75 -0
  33. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ko.js +76 -0
  34. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/lt.js +75 -0
  35. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/lv.js +75 -0
  36. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/mk.js +75 -0
  37. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/nb.js +2 -1
  38. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/nl.js +2 -1
  39. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/pl.js +18 -17
  40. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/pt-BR.js +74 -73
  41. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/pt.js +75 -0
  42. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ro.js +76 -0
  43. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ru.js +2 -1
  44. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/sk.js +76 -0
  45. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/sl.js +79 -0
  46. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/sq.js +79 -0
  47. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/sr-CIR.js +79 -0
  48. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/sr-LAT.js +79 -0
  49. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/sv.js +72 -74
  50. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/th.js +74 -0
  51. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/tr.js +75 -0
  52. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/ua.js +77 -0
  53. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/uk.js +76 -75
  54. data/app/assets/javascripts/comfy/admin/cms/lib/redactor/i18n/vi.js +74 -0
  55. data/app/assets/stylesheets/comfy/admin/cms/redactor_overrides.sass +2 -0
  56. data/app/controllers/comfy/admin/cms/categories_controller.rb +3 -3
  57. data/app/controllers/comfy/admin/cms/files_controller.rb +13 -5
  58. data/app/controllers/comfy/admin/cms/layouts_controller.rb +1 -1
  59. data/app/controllers/comfy/admin/cms/pages_controller.rb +1 -1
  60. data/app/controllers/comfy/admin/cms/snippets_controller.rb +1 -1
  61. data/app/controllers/comfy/cms/assets_controller.rb +3 -3
  62. data/app/controllers/comfy/cms/content_controller.rb +1 -1
  63. data/app/models/comfy/cms/layout.rb +6 -4
  64. data/app/models/comfy/cms/page.rb +1 -2
  65. data/app/models/comfy/cms/site.rb +6 -3
  66. data/app/views/comfy/admin/cms/files/index.html.haml +1 -1
  67. data/app/views/comfy/admin/cms/layouts/_form.html.haml +1 -1
  68. data/app/views/comfy/admin/cms/sites/_mirrors.html.haml +1 -1
  69. data/comfortable_mexican_sofa.gemspec +4 -4
  70. data/config/environments/test.rb +8 -3
  71. data/config/locales/sk.yml +243 -0
  72. data/config/locales/tr.yml +243 -0
  73. data/lib/comfortable_mexican_sofa/configuration.rb +2 -0
  74. data/lib/comfortable_mexican_sofa/routes/cms.rb +3 -2
  75. data/lib/comfortable_mexican_sofa/version.rb +1 -1
  76. data/test/controllers/comfy/admin/cms/files_controller_test.rb +20 -2
  77. data/test/controllers/comfy/admin/cms/pages_controller_test.rb +1 -0
  78. data/test/controllers/comfy/admin/cms/revisions_controller_test.rb +1 -1
  79. data/test/controllers/comfy/admin/cms/snippets_controller_test.rb +4 -1
  80. data/test/controllers/comfy/cms/content_controller_test.rb +3 -3
  81. data/test/gemfiles/Gemfile.rails.4.1 +1 -1
  82. data/test/gemfiles/Gemfile.rails.4.2 +1 -1
  83. data/test/gemfiles/{Gemfile.rails.4.0 → Gemfile.rails.5.0} +4 -3
  84. data/test/gemfiles/Gemfile.rails.master +1 -0
  85. data/test/integration/access_control_test.rb +4 -5
  86. data/test/integration/render_cms_test.rb +1 -1
  87. data/test/integration/routing_test.rb +1 -1
  88. data/test/lib/configuration_test.rb +6 -6
  89. data/test/lib/fixtures/files_test.rb +1 -1
  90. data/test/lib/fixtures/pages_test.rb +1 -1
  91. data/test/lib/tag_test.rb +21 -21
  92. data/test/lib/tags/helper_test.rb +2 -2
  93. data/test/lib/tags/page_file_test.rb +2 -2
  94. data/test/lib/tags/page_files_test.rb +2 -2
  95. data/test/lib/tags/partial_test.rb +1 -1
  96. data/test/lib/tags/snippet_test.rb +1 -1
  97. data/test/lib/tags/template_test.rb +1 -1
  98. data/test/models/block_test.rb +3 -3
  99. data/test/models/file_test.rb +1 -1
  100. data/test/models/layout_test.rb +14 -3
  101. data/test/models/site_test.rb +5 -5
  102. metadata +44 -9
@@ -107,7 +107,9 @@ class ComfortableMexicanSofa::Configuration
107
107
  'pl' => 'Polski',
108
108
  'pt-BR' => 'Português Brasileiro',
109
109
  'ru' => 'Русский',
110
+ 'sk' => 'Slovensky',
110
111
  'sv' => 'Svenska',
112
+ 'tr' => 'Türkçe',
111
113
  'uk' => 'Українська',
112
114
  'zh-CN' => '简体中文',
113
115
  'zh-TW' => '正體中文'
@@ -16,8 +16,9 @@ class ActionDispatch::Routing::Mapper
16
16
  :format => :xml
17
17
  end
18
18
 
19
- get '/:format' => 'content#show', :as => 'render_page', :path => "(*cms_path)"
19
+ get '(*cms_path)' => 'content#show', :as => 'render_page', action: '/:format'
20
+
20
21
  end
21
22
  end
22
23
  end
23
- end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module ComfortableMexicanSofa
2
- VERSION = "1.12.9"
2
+ VERSION = "1.12.10"
3
3
  end
@@ -157,6 +157,24 @@ class Comfy::Admin::Cms::FilesControllerTest < ActionController::TestCase
157
157
  assert_response :unprocessable_entity
158
158
  end
159
159
  end
160
+
161
+ def test_create_as_plupload_with_selected_category
162
+ category = comfy_cms_categories(:default)
163
+
164
+ assert_difference 'Comfy::Cms::File.count' do
165
+ post :create,
166
+ :source => 'plupload',
167
+ :site_id => @site,
168
+ :file => {
169
+ :file => fixture_file_upload('files/image.jpg', 'image/jpeg')
170
+ },
171
+ :category => [category.label]
172
+ assert_response :success
173
+
174
+ file = Comfy::Cms::File.last
175
+ assert_equal [category], file.categories
176
+ end
177
+ end
160
178
 
161
179
  def test_update
162
180
  put :update, :site_id => @site, :id => @file, :file => {
@@ -173,9 +191,8 @@ class Comfy::Admin::Cms::FilesControllerTest < ActionController::TestCase
173
191
  end
174
192
 
175
193
  def test_update_failure
176
- file = comfy_cms_files(:default)
177
194
  put :update, :site_id => @site, :id => @file, :file => {
178
- :file => nil
195
+ :file_file_name => ""
179
196
  }
180
197
  assert_response :success
181
198
  assert_template :edit
@@ -216,4 +233,5 @@ class Comfy::Admin::Cms::FilesControllerTest < ActionController::TestCase
216
233
  assert_equal 1, file_one.position
217
234
  assert_equal 0, file_two.position
218
235
  end
236
+
219
237
  end
@@ -518,4 +518,5 @@ class Comfy::Admin::Cms::PagesControllerTest < ActionController::TestCase
518
518
  assert_equal 1, page_one.position
519
519
  assert_equal 0, page_two.position
520
520
  end
521
+
521
522
  end
@@ -135,4 +135,4 @@ class Comfy::Admin::Cms::RevisionsControllerTest < ActionController::TestCase
135
135
  end
136
136
  end
137
137
 
138
- end
138
+ end
@@ -17,7 +17,10 @@ class Comfy::Admin::Cms::SnippetsControllerTest < ActionController::TestCase
17
17
  end
18
18
 
19
19
  def test_get_index_with_category
20
- category = comfy_cms_sites(:default).categories.create!(:label => 'Test Category', :categorized_type => 'Comfy::Cms::Snippet')
20
+ category = comfy_cms_sites(:default).categories.create!(
21
+ :label => 'Test Category',
22
+ :categorized_type => 'Comfy::Cms::Snippet'
23
+ )
21
24
  category.categorizations.create!(:categorized => comfy_cms_snippets(:default))
22
25
 
23
26
  get :index, :site_id => comfy_cms_sites(:default), :category => category.label
@@ -61,10 +61,10 @@ class Comfy::Cms::ContentControllerTest < ActionController::TestCase
61
61
  assert_equal page.id, json_response['id']
62
62
  assert_equal page.site.id, json_response['site_id']
63
63
  assert_equal page.layout.id, json_response['layout_id']
64
- assert_equal nil, json_response['parent_id']
65
- assert_equal nil, json_response['target_page_id']
64
+ assert_nil json_response['parent_id']
65
+ assert_nil json_response['target_page_id']
66
66
  assert_equal 'Default Page', json_response['label']
67
- assert_equal nil, json_response['slug']
67
+ assert_nil json_response['slug']
68
68
  assert_equal '/', json_response['full_path']
69
69
  assert_equal content, json_response['content_cache']
70
70
  assert_equal 0, json_response['position']
@@ -3,7 +3,7 @@ source 'http://rubygems.org'
3
3
  gem 'rails', '~> 4.1.0'
4
4
  gem 'bootstrap_form', '>= 2.2.0'
5
5
  gem 'active_link_to', '>= 1.0.0'
6
- gem 'paperclip', '>= 3.4.0'
6
+ gem 'paperclip', '>= 3.4.0', '< 5'
7
7
  gem 'kramdown', '>= 1.0.0'
8
8
  gem 'jquery-rails', '>= 3.0.0'
9
9
  gem 'jquery-ui-rails', '>= 5.0.0'
@@ -3,7 +3,7 @@ source 'http://rubygems.org'
3
3
  gem 'rails', '~> 4.2.0'
4
4
  gem 'bootstrap_form', '>= 2.2.0'
5
5
  gem 'active_link_to', '>= 1.0.0'
6
- gem 'paperclip', '>= 3.4.0'
6
+ gem 'paperclip', '>= 3.4.0', '< 5'
7
7
  gem 'kramdown', '>= 1.0.0'
8
8
  gem 'jquery-rails', '>= 3.0.0'
9
9
  gem 'jquery-ui-rails', '>= 5.0.0'
@@ -1,11 +1,11 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rails', '~> 4.0.0'
3
+ gem 'rails', '~> 5.0.0'
4
4
  gem 'bootstrap_form', '>= 2.2.0'
5
5
  gem 'active_link_to', '>= 1.0.0'
6
- gem 'paperclip', '>= 3.4.0'
6
+ gem 'paperclip', '>= 3.4.0', '< 5'
7
7
  gem 'kramdown', '>= 1.0.0'
8
- gem 'jquery-rails', '>= 3.0.0', '< 4'
8
+ gem 'jquery-rails', '>= 3.0.0'
9
9
  gem 'jquery-ui-rails', '>= 5.0.0'
10
10
  gem 'haml-rails', '>= 0.3.0'
11
11
  gem 'sass-rails', '>= 4.0.3'
@@ -19,4 +19,5 @@ group :test do
19
19
  gem 'sqlite3'
20
20
  gem 'coveralls', :require => false
21
21
  gem 'mocha', :require => false
22
+ gem 'rails-controller-testing'
22
23
  end
@@ -19,4 +19,5 @@ group :test do
19
19
  gem 'sqlite3'
20
20
  gem 'coveralls', :require => false
21
21
  gem 'mocha', :require => false
22
+ gem 'rails-controller-testing'
22
23
  end
@@ -5,7 +5,7 @@ class AccessControlTest < ActionDispatch::IntegrationTest
5
5
  module TestAuthentication
6
6
  module Authenticate
7
7
  def authenticate
8
- render :text => 'Test Login Denied', :status => :unauthorized
8
+ render :plain => 'Test Login Denied', :status => :unauthorized
9
9
  end
10
10
  end
11
11
 
@@ -19,7 +19,7 @@ class AccessControlTest < ActionDispatch::IntegrationTest
19
19
  module Authorize
20
20
  def authorize
21
21
  @authorization_vars = self.instance_variables
22
- render :text => 'Test Access Denied', :status => :forbidden
22
+ render :plain => 'Test Access Denied', :status => :forbidden
23
23
  end
24
24
  end
25
25
 
@@ -140,7 +140,7 @@ class AccessControlTest < ActionDispatch::IntegrationTest
140
140
  def test_public_authentication_custom
141
141
  with_routing do |routes|
142
142
  routes.draw do
143
- get '/:format' => 'access_control_test/test_authentication/content#show', :path => "(*cms_path)"
143
+ get "(*cms_path)" => 'access_control_test/test_authentication/content#show'
144
144
  end
145
145
 
146
146
  get '/'
@@ -152,7 +152,7 @@ class AccessControlTest < ActionDispatch::IntegrationTest
152
152
  def test_public_authorization_custom
153
153
  with_routing do |routes|
154
154
  routes.draw do
155
- get '/:format' => 'access_control_test/test_authorization/content#show', :path => "(*cms_path)"
155
+ get "(*cms_path)" => 'access_control_test/test_authorization/content#show'
156
156
  end
157
157
 
158
158
  get '/'
@@ -160,5 +160,4 @@ class AccessControlTest < ActionDispatch::IntegrationTest
160
160
  assert_equal 'Test Access Denied', response.body
161
161
  end
162
162
  end
163
-
164
163
  end
@@ -39,7 +39,7 @@ class RenderCmsIntergrationTest < ActionDispatch::IntegrationTest
39
39
  def render_basic
40
40
  case params[:type]
41
41
  when 'text'
42
- render :text => 'TestText'
42
+ render :plain => 'TestText'
43
43
  when 'update'
44
44
  render :update do |page|
45
45
  page.alert('rendered text')
@@ -8,7 +8,7 @@ class RoutingIntergrationTest < ActionDispatch::IntegrationTest
8
8
 
9
9
  def test_cms_public_prefix
10
10
 
11
- assert_equal nil, ComfortableMexicanSofa.config.public_cms_path
11
+ assert_nil ComfortableMexicanSofa.config.public_cms_path
12
12
 
13
13
  Rails.application.routes.draw do
14
14
  comfy_route :cms, :path => '/custom'
@@ -19,14 +19,14 @@ class ConfigurationTest < ActiveSupport::TestCase
19
19
  'en' => 'English',
20
20
  'es' => 'Español'
21
21
  }), config.locales
22
- assert_equal nil, config.admin_locale
22
+ assert_nil config.admin_locale
23
23
  assert_equal ({}), config.upload_file_options
24
- assert_equal nil, config.admin_cache_sweeper
24
+ assert_nil config.admin_cache_sweeper
25
25
  assert_equal false, config.allow_irb
26
- assert_equal nil, config.allowed_helpers
27
- assert_equal nil, config.allowed_partials
28
- assert_equal nil, config.allowed_templates
29
- assert_equal nil, config.hostname_aliases
26
+ assert_nil config.allowed_helpers
27
+ assert_nil config.allowed_partials
28
+ assert_nil config.allowed_templates
29
+ assert_nil config.hostname_aliases
30
30
  end
31
31
 
32
32
  def test_initialization_overrides
@@ -83,7 +83,7 @@ class FixtureFilesTest < ActiveSupport::TestCase
83
83
  end
84
84
 
85
85
  def test_export
86
- comfy_cms_files(:default).update_column(:block_id, comfy_cms_blocks(:default_field_text))
86
+ comfy_cms_files(:default).update_attribute(:block, comfy_cms_blocks(:default_field_text))
87
87
 
88
88
  host_path = File.join(ComfortableMexicanSofa.config.fixtures_path, 'test-site')
89
89
  attr_path = File.join(host_path, 'files/_sample.jpg.yml')
@@ -90,7 +90,7 @@ class FixturePagesTest < ActiveSupport::TestCase
90
90
  ComfortableMexicanSofa::Fixture::Page::Importer.new('sample-site', 'default-site').import!
91
91
  page.reload
92
92
 
93
- assert_equal nil, page.slug
93
+ assert_nil page.slug
94
94
  assert_equal 'Test', page.label
95
95
  block = page.blocks.where(:identifier => 'content').first
96
96
  assert_equal 'test content', block.content
@@ -6,55 +6,55 @@ class TagTest < ActiveSupport::TestCase
6
6
  regex = ComfortableMexicanSofa::Tag::TOKENIZER_REGEX
7
7
 
8
8
  tokens = 'text { text } text'.scan(regex)
9
- assert_equal nil, tokens[0][0]
9
+ assert_nil tokens[0][0]
10
10
  assert_equal 'text { text } text', tokens[0][1]
11
11
 
12
12
  tokens = 'content<{{cms:some_tag content'.scan(regex)
13
- assert_equal nil, tokens[0][0]
13
+ assert_nil tokens[0][0]
14
14
  assert_equal 'content<', tokens[0][1]
15
- assert_equal nil, tokens[1][0]
15
+ assert_nil tokens[1][0]
16
16
  assert_equal '{{', tokens[1][1]
17
- assert_equal nil, tokens[2][0]
17
+ assert_nil tokens[2][0]
18
18
  assert_equal 'cms:some_tag content', tokens[2][1]
19
19
 
20
20
  tokens = 'content<{{cms some_tag}}>content'.scan(regex)
21
- assert_equal nil, tokens[0][0]
21
+ assert_nil tokens[0][0]
22
22
  assert_equal 'content<', tokens[0][1]
23
- assert_equal nil, tokens[1][0]
23
+ assert_nil tokens[1][0]
24
24
  assert_equal '{{', tokens[1][1]
25
- assert_equal nil, tokens[2][0]
25
+ assert_nil tokens[2][0]
26
26
  assert_equal 'cms some_tag}}>content',tokens[2][1]
27
27
 
28
28
  tokens = 'content<{{cms:some_tag}}>content'.scan(regex)
29
- assert_equal nil, tokens[0][0]
29
+ assert_nil tokens[0][0]
30
30
  assert_equal 'content<', tokens[0][1]
31
31
  assert_equal '{{cms:some_tag}}', tokens[1][0]
32
- assert_equal nil, tokens[1][1]
33
- assert_equal nil, tokens[2][0]
32
+ assert_nil tokens[1][1]
33
+ assert_nil tokens[2][0]
34
34
  assert_equal '>content', tokens[2][1]
35
35
 
36
36
  tokens = 'content<{{cms:type:label}}>content'.scan(regex)
37
- assert_equal nil, tokens[0][0]
37
+ assert_nil tokens[0][0]
38
38
  assert_equal 'content<', tokens[0][1]
39
39
  assert_equal '{{cms:type:label}}', tokens[1][0]
40
- assert_equal nil, tokens[1][1]
41
- assert_equal nil, tokens[2][0]
40
+ assert_nil tokens[1][1]
41
+ assert_nil tokens[2][0]
42
42
  assert_equal '>content', tokens[2][1]
43
43
 
44
44
  tokens = 'content<{{cms:type:label }}>content'.scan(regex)
45
- assert_equal nil, tokens[0][0]
45
+ assert_nil tokens[0][0]
46
46
  assert_equal 'content<', tokens[0][1]
47
47
  assert_equal '{{cms:type:label }}', tokens[1][0]
48
- assert_equal nil, tokens[1][1]
49
- assert_equal nil, tokens[2][0]
48
+ assert_nil tokens[1][1]
49
+ assert_nil tokens[2][0]
50
50
  assert_equal '>content', tokens[2][1]
51
51
 
52
52
  tokens = 'content<{{ cms:type:la/b el }}>content'.scan(regex)
53
- assert_equal nil, tokens[0][0]
53
+ assert_nil tokens[0][0]
54
54
  assert_equal 'content<', tokens[0][1]
55
55
  assert_equal '{{ cms:type:la/b el }}',tokens[1][0]
56
- assert_equal nil, tokens[1][1]
57
- assert_equal nil, tokens[2][0]
56
+ assert_nil tokens[1][1]
57
+ assert_nil tokens[2][0]
58
58
  assert_equal '>content', tokens[2][1]
59
59
  end
60
60
 
@@ -62,7 +62,7 @@ class TagTest < ActiveSupport::TestCase
62
62
  string = '<p>text</p>' * 400
63
63
  tokens = string.scan(ComfortableMexicanSofa::Tag::TOKENIZER_REGEX)
64
64
  assert_equal 1, tokens.count
65
- assert_equal nil, tokens[0][0]
65
+ assert_nil tokens[0][0]
66
66
  assert_equal string, tokens[0][1]
67
67
  end
68
68
 
@@ -285,7 +285,7 @@ class TagTest < ActiveSupport::TestCase
285
285
  comfy_cms_pages(:default), '{{ cms:page:content:string }}'
286
286
  )
287
287
  assert_equal 'content', tag.identifier
288
- assert_equal nil, tag.namespace
288
+ assert_nil tag.namespace
289
289
 
290
290
  assert tag = ComfortableMexicanSofa::Tag::PageString.initialize_tag(
291
291
  comfy_cms_pages(:default), '{{ cms:page:home.content:string }}'
@@ -62,7 +62,7 @@ class HelperTagTest < ActiveSupport::TestCase
62
62
  comfy_cms_pages(:default), "{{ cms:helper:#{method}:Rails.env }}"
63
63
  )
64
64
  assert_equal "<%= #{method}('Rails.env') %>", tag.content
65
- assert_equal nil, tag.render
65
+ assert_nil tag.render
66
66
  end
67
67
  end
68
68
 
@@ -80,7 +80,7 @@ class HelperTagTest < ActiveSupport::TestCase
80
80
  comfy_cms_pages(:default), "{{ cms:helper:invalid:Rails.env }}"
81
81
  )
82
82
  assert_equal "<%= invalid('Rails.env') %>", tag.content
83
- assert_equal nil, tag.render
83
+ assert_nil tag.render
84
84
  end
85
85
 
86
86
  end
@@ -9,7 +9,7 @@ class PageFileTagTest < ActiveSupport::TestCase
9
9
  assert_equal 'label', tag.identifier
10
10
  assert_nil tag.namespace
11
11
  assert 'url', tag.type
12
- assert_equal nil, tag.dimensions
12
+ assert_nil tag.dimensions
13
13
 
14
14
  assert tag = ComfortableMexicanSofa::Tag::PageFile.initialize_tag(
15
15
  comfy_cms_pages(:default), '{{ cms:page_file:label:partial }}'
@@ -50,7 +50,7 @@ class PageFileTagTest < ActiveSupport::TestCase
50
50
  assert_equal "<%= render :partial => 'partials/page_file', :locals => {:identifier => nil} %>", tag.render
51
51
 
52
52
  assert tag = ComfortableMexicanSofa::Tag::PageFile.initialize_tag(page, '{{ cms:page_file:file }}')
53
- assert_equal nil, tag.content
53
+ assert_nil tag.content
54
54
  assert_equal '', tag.render
55
55
 
56
56
  page.update_attributes!(
@@ -8,8 +8,8 @@ class PageFilesTagTest < ActiveSupport::TestCase
8
8
  )
9
9
  assert 'url', tag.type
10
10
  assert_equal 'label', tag.identifier
11
- assert_equal nil, tag.namespace
12
- assert_equal nil, tag.dimensions
11
+ assert_nil tag.namespace
12
+ assert_nil tag.dimensions
13
13
 
14
14
  assert tag = ComfortableMexicanSofa::Tag::PageFiles.initialize_tag(
15
15
  comfy_cms_pages(:default), '{{ cms:page_files:label:partial }}'
@@ -70,7 +70,7 @@ class PartialTagTest < ActiveSupport::TestCase
70
70
  comfy_cms_pages(:default), '{{cms:partial:unsafe/path}}'
71
71
  )
72
72
  assert_equal "<%= render :partial => 'unsafe/path' %>", tag.content
73
- assert_equal nil, tag.render
73
+ assert_nil tag.render
74
74
  end
75
75
 
76
76
  end
@@ -39,7 +39,7 @@ class SnippetTagTest < ActiveSupport::TestCase
39
39
  tag = ComfortableMexicanSofa::Tag::Snippet.initialize_tag(
40
40
  comfy_cms_pages(:default), "{{cms:snippet:doesnot_exist}}"
41
41
  )
42
- assert_equal nil, tag.content
42
+ assert_nil tag.content
43
43
  assert_equal '', tag.render
44
44
  end
45
45
  end
@@ -50,7 +50,7 @@ class TemplateTagTest < ActiveSupport::TestCase
50
50
  comfy_cms_pages(:default), '{{cms:template:unsafe/path}}'
51
51
  )
52
52
  assert_equal "<%= render :template => 'unsafe/path' %>", tag.content
53
- assert_equal nil, tag.render
53
+ assert_nil tag.render
54
54
  end
55
55
 
56
56
  end
@@ -31,7 +31,7 @@ class CmsBlockTest < ActiveSupport::TestCase
31
31
  block = Comfy::Cms::Block.new
32
32
 
33
33
  block.content = fixture_file_upload('files/image.jpg', 'image/jpeg')
34
- assert_equal nil, block.content
34
+ assert_nil block.content
35
35
  assert_equal 1, block.temp_files.size
36
36
  end
37
37
 
@@ -125,7 +125,7 @@ class CmsBlockTest < ActiveSupport::TestCase
125
125
  assert_equal 1, page.blocks.count
126
126
  block = page.blocks.first
127
127
  assert_equal 'file', block.identifier
128
- assert_equal nil, block.content
128
+ assert_nil block.content
129
129
  assert_equal 1, block.files.count
130
130
  assert_equal 'image.jpg', block.files.first.file_file_name
131
131
 
@@ -173,7 +173,7 @@ class CmsBlockTest < ActiveSupport::TestCase
173
173
  assert_equal 1, page.blocks.count
174
174
  block = page.blocks.first
175
175
  assert_equal 'files', block.identifier
176
- assert_equal nil, block.content
176
+ assert_nil block.content
177
177
  assert_equal 2, block.files.count
178
178
  assert_equal ['image.jpg', 'image.gif'], block.files.collect(&:file_file_name)
179
179
  end