We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4e61b6 commit efaa23dCopy full SHA for efaa23d
1 file changed
test/controllers/controller_test.rb
@@ -4,6 +4,10 @@ def set_content_type_header!
4
@request.headers['Content-Type'] = JSONAPI::MEDIA_TYPE
5
end
6
7
+class ConfigControllerTest < ActionController::TestCase
8
+
9
+end
10
11
class PostsControllerTest < ActionController::TestCase
12
def test_index
13
get :index
@@ -1388,6 +1392,14 @@ def setup
1388
1392
JSONAPI.configuration.json_key_format = :camelized_key
1389
1393
1390
1394
1395
+ def test_text_error
1396
+ JSONAPI.configuration.use_text_errors = true
1397
+ get :index, {sort: 'not_in_record'}
1398
+ assert_response 400
1399
+ assert_equal 'INVALID_SORT_FORMAT', json_response['errors'][0]['code']
1400
+ JSONAPI.configuration.use_text_errors = false
1401
+ end
1402
1391
1403
def test_expense_entries_index
1404
1405
assert_response :success
0 commit comments