diff options
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/resource_generator_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/railties/test/generators/resource_generator_test.rb b/railties/test/generators/resource_generator_test.rb index 581d80d60e..f73169c6fb 100644 --- a/railties/test/generators/resource_generator_test.rb +++ b/railties/test/generators/resource_generator_test.rb @@ -85,4 +85,10 @@ class ResourceGeneratorTest < Rails::Generators::TestCase assert_no_match(/resources :accounts$/, route) end end + + def test_api_only_does_not_generate_edit_route + run_generator ["Account", "--api"] + + assert_file "config/routes.rb", /resources :accounts, except: \[:new, :edit\]$/ + end end |