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:
parent
da5acae032
commit
2430268f18
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue