test/controllers/controller_test.rb in jsonapi-resources-0.5.1 vs test/controllers/controller_test.rb in jsonapi-resources-0.5.2
- old
+ new
@@ -203,9 +203,15 @@
get :index, {filter: {author: '1'}}
assert_response :success
assert_equal 3, json_response['data'].size
end
+ def test_sorting_blank
+ get :index, {sort: ''}
+
+ assert_response :success
+ end
+
def test_sorting_asc
get :index, {sort: 'title'}
assert_response :success
assert_equal "A First Post", json_response['data'][0]['attributes']['title']