diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2015-07-23 17:58:02 +0200 |
---|---|---|
committer | Robin Dupret <robin.dupret@gmail.com> | 2015-07-23 18:27:18 +0200 |
commit | e3cfd5b174f37146b81026c0d1856b672bd6bbec (patch) | |
tree | d65f8c4574b1f05794644f63bb5d639984698228 /railties/test | |
parent | 67863aa8440805628477647e1015372d11913ca7 (diff) | |
download | rails-e3cfd5b174f37146b81026c0d1856b672bd6bbec.tar.gz rails-e3cfd5b174f37146b81026c0d1856b672bd6bbec.tar.bz2 rails-e3cfd5b174f37146b81026c0d1856b672bd6bbec.zip |
Make ApplicationController inherit from AC::API for API plugins
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 2f6c66cade..86a776f840 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -556,6 +556,14 @@ class PluginGeneratorTest < Rails::Generators::TestCase end end + def test_application_controller_parent_for_mountable_api_plugins + run_generator [destination_root, '--mountable', '--api'] + + assert_file "app/controllers/bukkits/application_controller.rb" do |content| + assert_match "ApplicationController < ActionController::API", content + end + end + protected def action(*args, &block) silence(:stdout){ generator.send(*args, &block) } |