1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add tests for api_only configuration setting

This commit is contained in:
Jorge Bejar 2015-12-04 18:04:48 -03:00
parent da5acae032
commit 2430268f18

View file

@ -1393,5 +1393,20 @@ module ApplicationTests
assert_equal 'unicorn', Rails.application.config.my_custom_config['key']
end
test "api_only is false by default" do
app 'development'
refute Rails.application.config.api_only
end
test "api_only generator config is set when api_only is set" do
add_to_config <<-RUBY
config.api_only = true
RUBY
app 'development'
Rails.application.load_generators
assert Rails.configuration.api_only
end
end
end