@@ -297,7 +297,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
297297
298298 # Should get an error because 'private_comments' is not public
299299 errors = response . resp_body [ "errors" ]
300- assert length ( errors ) > 0
300+ assert errors != [ ]
301301 # Error should indicate the relationship is invalid/not included
302302 assert List . first ( errors ) [ "code" ] in [ "invalid_includes" , "invalid_relationship" ]
303303 end
@@ -324,14 +324,14 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
324324
325325 # Multiple posts in the response
326326 assert is_list ( response . resp_body [ "data" ] )
327- assert length ( response . resp_body [ "data" ] ) > 0
327+ assert response . resp_body [ "data" ] != [ ]
328328
329329 # Each post that has comments should have pagination metadata
330330 Enum . each ( response . resp_body [ "data" ] , fn post_data ->
331331 comments_rel = post_data [ "relationships" ] [ "comments" ]
332332
333333 # If there are comments, check for pagination metadata
334- if length ( comments_rel [ "data" ] ) > 0 do
334+ if comments_rel [ "data" ] != [ ] do
335335 assert comments_rel [ "meta" ] [ "limit" ] == 3
336336 end
337337 end )
@@ -411,7 +411,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
411411 )
412412
413413 errors = response . resp_body [ "errors" ]
414- assert length ( errors ) > 0
414+ assert errors != [ ]
415415 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
416416 assert List . first ( errors ) [ "detail" ] =~ "limit must be an integer"
417417 end
@@ -425,7 +425,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
425425 )
426426
427427 errors = response . resp_body [ "errors" ]
428- assert length ( errors ) > 0
428+ assert errors != [ ]
429429 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
430430 assert List . first ( errors ) [ "detail" ] =~ "limit must be a positive integer"
431431 end
@@ -439,7 +439,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
439439 )
440440
441441 errors = response . resp_body [ "errors" ]
442- assert length ( errors ) > 0
442+ assert errors != [ ]
443443 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
444444 assert List . first ( errors ) [ "detail" ] =~ "limit must be a positive integer"
445445 end
@@ -453,7 +453,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
453453 )
454454
455455 errors = response . resp_body [ "errors" ]
456- assert length ( errors ) > 0
456+ assert errors != [ ]
457457 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
458458 assert List . first ( errors ) [ "detail" ] =~ "offset must be an integer"
459459 end
@@ -467,7 +467,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
467467 )
468468
469469 errors = response . resp_body [ "errors" ]
470- assert length ( errors ) > 0
470+ assert errors != [ ]
471471 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
472472 assert List . first ( errors ) [ "detail" ] =~ "offset must be a non-negative integer"
473473 end
@@ -481,7 +481,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
481481 )
482482
483483 errors = response . resp_body [ "errors" ]
484- assert length ( errors ) > 0
484+ assert errors != [ ]
485485 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
486486 assert List . first ( errors ) [ "detail" ] =~ "count must be 'true' or 'false'"
487487 end
@@ -495,7 +495,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
495495 )
496496
497497 errors = response . resp_body [ "errors" ]
498- assert length ( errors ) > 0
498+ assert errors != [ ]
499499 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
500500 assert List . first ( errors ) [ "detail" ] =~ "unknown pagination parameter"
501501 end
@@ -545,7 +545,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
545545 )
546546
547547 errors = response . resp_body [ "errors" ]
548- assert length ( errors ) > 0
548+ assert errors != [ ]
549549 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
550550 assert List . first ( errors ) [ "detail" ] =~ "invalid JSON"
551551 end
@@ -562,7 +562,7 @@ defmodule Test.Acceptance.PaginatedRelationshipsTest do
562562 )
563563
564564 errors = response . resp_body [ "errors" ]
565- assert length ( errors ) > 0
565+ assert errors != [ ]
566566 assert List . first ( errors ) [ "code" ] == "invalid_pagination"
567567 assert List . first ( errors ) [ "detail" ] =~ "must be a JSON object"
568568 end
0 commit comments