aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/shared_generator_tests.rb
diff options
context:
space:
mode:
authorBogdan <bogdanvlviv@gmail.com>2018-10-21 20:29:58 +0300
committerRyuta Kamizono <kamipo@gmail.com>2018-10-22 02:29:58 +0900
commitb004e767e03f11eb7e13828a5efbe030eb861cb0 (patch)
treec52e9bed94f7d3b86bb626e968a2a90ea9a741ee /railties/test/generators/shared_generator_tests.rb
parent5a6200a5ad7cda067fd45bf3394569d8dd32924f (diff)
downloadrails-b004e767e03f11eb7e13828a5efbe030eb861cb0.tar.gz
rails-b004e767e03f11eb7e13828a5efbe030eb861cb0.tar.bz2
rails-b004e767e03f11eb7e13828a5efbe030eb861cb0.zip
Correct some tests related to changes in #33079 (#34272)
* Fix assertions of auto-generated ActiveStorage JS Since #33079 * Correct message on the `assert_equal` failure Related to #33079 * Test ActionCable's js files This commit adds `app/javascript/channels/consumer.js`, and `app/javascript/channels/index.js` to `DEFAULT_APP_FILES` in order to assert their existance in `test_skeleton_is_created`. Related to #33079 * Assert no match `javascript_pack_tag` in `application.html.erb` Since #33079 `rails new` generates `application.html.erb` file with `javascript_pack_tag` instead of `javascript_include_tag`. Note that there some tests that asserting no matching `javascript_include_tag` in the `application.html.erb` file for newly generated rails plugins. It is related to #34009 and shouldn't be changed right now.
Diffstat (limited to 'railties/test/generators/shared_generator_tests.rb')
-rw-r--r--railties/test/generators/shared_generator_tests.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb
index d61545a7b5..398466aa22 100644
--- a/railties/test/generators/shared_generator_tests.rb
+++ b/railties/test/generators/shared_generator_tests.rb
@@ -231,7 +231,7 @@ module SharedGeneratorTests
assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']active_storage\/engine["']/
assert_file "#{application_path}/app/javascript/packs/application.js" do |content|
- assert_no_match(/^\/\/= require activestorage/, content)
+ assert_no_match(/activestorage/, content)
end
assert_file "#{application_path}/config/environments/development.rb" do |content|
@@ -261,7 +261,7 @@ module SharedGeneratorTests
assert_file "#{application_path}/config/application.rb", /#\s+require\s+["']active_storage\/engine["']/
assert_file "#{application_path}/app/javascript/packs/application.js" do |content|
- assert_no_match(/^import * as ActiveStorage from "activestorage"\nActiveStorage.start()/, content)
+ assert_no_match(/^import * as ActiveStorage from "activestorage"\nActiveStorage.start\(\)/, content)
end
assert_file "#{application_path}/config/environments/development.rb" do |content|