test/controllers/controller_test.rb in jsonapi-resources-0.0.9 vs test/controllers/controller_test.rb in jsonapi-resources-0.0.10
- old
+ new
@@ -969,9 +969,15 @@
assert_response :success
assert json_response['tags'].is_a?(Array)
assert_equal 4, json_response['tags'].size
assert_equal 2, json_response['linked']['posts'].size
end
+
+ def test_tags_show_multiple_with_nonexistent_ids
+ get :show, {id: '6,99,9,100'}
+ assert_response :not_found
+ assert_match /The record identified by 99 could not be found./, json_response['errors'][0]['detail']
+ end
end
class ExpenseEntriesControllerTest < ActionController::TestCase
def after_teardown
JSONAPI.configuration.json_key_format = :camelized_key