diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-17 09:10:36 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-12-17 09:10:36 +0900 |
commit | c5b900da7323d33ae10e00c45ca7aaebc0e9c75c (patch) | |
tree | dd0f94e00e63cb16a76dcae291516fa9cf175c43 /railties | |
parent | 28d2968533c860e7e4a836d0440cf6b3b11ad11f (diff) | |
download | rails-c5b900da7323d33ae10e00c45ca7aaebc0e9c75c.tar.gz rails-c5b900da7323d33ae10e00c45ca7aaebc0e9c75c.tar.bz2 rails-c5b900da7323d33ae10e00c45ca7aaebc0e9c75c.zip |
Add test case that active_storage:install task works within engine
Follow up of #31391
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/railties/engine_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/railties/engine_test.rb b/railties/test/railties/engine_test.rb index 4a861bff55..339a56c34f 100644 --- a/railties/test/railties/engine_test.rb +++ b/railties/test/railties/engine_test.rb @@ -1479,6 +1479,21 @@ YAML assert_equal "/fruits/2/bukkits/posts", last_response.body end + test "active_storage:install task works within engine" do + @plugin.write "Rakefile", <<-RUBY + APP_RAKEFILE = '#{app_path}/Rakefile' + load 'rails/tasks/engine.rake' + RUBY + + Dir.chdir(@plugin.path) do + output = `bundle exec rake app:active_storage:install` + assert $?.success?, output + + active_storage_migration = migrations.detect { |migration| migration.name == "CreateActiveStorageTables" } + assert active_storage_migration + end + end + private def app Rails.application |