mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Clarify naming of expected response w/ pagination but empty data
This commit is contained in:
@@ -117,7 +117,7 @@ module ActiveModelSerializers
|
||||
end
|
||||
end
|
||||
|
||||
def expected_response_with_no_data_pagination_links
|
||||
def expected_response_with_empty_collection_pagination_links
|
||||
{}.tap do |hash|
|
||||
hash[:data] = []
|
||||
hash.merge! links: empty_collection_links
|
||||
@@ -148,7 +148,7 @@ module ActiveModelSerializers
|
||||
|
||||
adapter = load_adapter(using_kaminari(1), mock_request)
|
||||
|
||||
assert_equal expected_response_with_no_data_pagination_links, adapter.serializable_hash
|
||||
assert_equal expected_response_with_empty_collection_pagination_links, adapter.serializable_hash
|
||||
end
|
||||
|
||||
def test_pagination_links_when_zero_results_will_paginate
|
||||
@@ -156,7 +156,7 @@ module ActiveModelSerializers
|
||||
|
||||
adapter = load_adapter(using_will_paginate(1), mock_request)
|
||||
|
||||
assert_equal expected_response_with_no_data_pagination_links, adapter.serializable_hash
|
||||
assert_equal expected_response_with_empty_collection_pagination_links, adapter.serializable_hash
|
||||
end
|
||||
|
||||
def test_last_page_pagination_links_using_kaminari
|
||||
|
||||
Reference in New Issue
Block a user