mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
adding tests order config
This commit is contained in:
parent
b706e521ef
commit
49e41cb83c
@ -319,13 +319,13 @@ module ActionController
|
|||||||
response = JSON.parse(@response.body)
|
response = JSON.parse(@response.body)
|
||||||
|
|
||||||
expected_return = {
|
expected_return = {
|
||||||
|
"id"=>1,
|
||||||
|
"time"=>DateTime.now.to_s,
|
||||||
"post" => {
|
"post" => {
|
||||||
"id"=>1,
|
"id"=>1,
|
||||||
"title"=>"New Post",
|
"title"=>"New Post",
|
||||||
"body"=>"Body"
|
"body"=>"Body"
|
||||||
},
|
}
|
||||||
"id"=>1,
|
|
||||||
"time"=>DateTime.now.to_s
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_equal 'application/json', @response.content_type
|
assert_equal 'application/json', @response.content_type
|
||||||
|
|||||||
@ -12,7 +12,8 @@ Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
|||||||
class Foo < Rails::Application
|
class Foo < Rails::Application
|
||||||
if Rails.version.to_s.start_with? '4'
|
if Rails.version.to_s.start_with? '4'
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
ActionController::Base.cache_store = :memory_store
|
config.active_support.test_order = :random
|
||||||
|
ActionController::Base.cache_store = :memory_store
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user