@@ -606,16 +606,16 @@ def test_pagination_empty_results
606606
607607
608608 def test_flow_self
609- assert_cacheable_jsonapi_get '/posts'
610- post_1 = json_response [ 'data' ] [ 0 ]
609+ assert_cacheable_jsonapi_get '/posts/1 '
610+ post_1 = json_response [ 'data' ]
611611
612612 assert_cacheable_jsonapi_get post_1 [ 'links' ] [ 'self' ]
613613 assert_hash_equals post_1 , json_response [ 'data' ]
614614 end
615615
616616 def test_flow_link_to_one_self_link
617- assert_cacheable_jsonapi_get '/posts'
618- post_1 = json_response [ 'data' ] [ 0 ]
617+ assert_cacheable_jsonapi_get '/posts/1 '
618+ post_1 = json_response [ 'data' ]
619619
620620 assert_cacheable_jsonapi_get post_1 [ 'relationships' ] [ 'author' ] [ 'links' ] [ 'self' ]
621621 assert_hash_equals ( json_response , {
@@ -628,8 +628,8 @@ def test_flow_link_to_one_self_link
628628 end
629629
630630 def test_flow_link_to_many_self_link
631- assert_cacheable_jsonapi_get '/posts'
632- post_1 = json_response [ 'data' ] [ 0 ]
631+ assert_cacheable_jsonapi_get '/posts/1 '
632+ post_1 = json_response [ 'data' ]
633633
634634 assert_cacheable_jsonapi_get post_1 [ 'relationships' ] [ 'tags' ] [ 'links' ] [ 'self' ]
635635 assert_hash_equals ( json_response ,
@@ -647,10 +647,10 @@ def test_flow_link_to_many_self_link
647647 end
648648
649649 def test_flow_link_to_many_self_link_put
650- assert_cacheable_jsonapi_get '/posts'
651- post_1 = json_response [ 'data' ] [ 4 ]
650+ assert_cacheable_jsonapi_get '/posts/5 '
651+ post_5 = json_response [ 'data' ]
652652
653- post post_1 [ 'relationships' ] [ 'tags' ] [ 'links' ] [ 'self' ] , params :
653+ post post_5 [ 'relationships' ] [ 'tags' ] [ 'links' ] [ 'self' ] , params :
654654 { 'data' => [ { 'type' => 'tags' , 'id' => '10' } ] } . to_json ,
655655 headers : {
656656 'CONTENT_TYPE' => JSONAPI ::MEDIA_TYPE ,
@@ -659,7 +659,7 @@ def test_flow_link_to_many_self_link_put
659659
660660 assert_equal 204 , status
661661
662- assert_cacheable_jsonapi_get post_1 [ 'relationships' ] [ 'tags' ] [ 'links' ] [ 'self' ]
662+ assert_cacheable_jsonapi_get post_5 [ 'relationships' ] [ 'tags' ] [ 'links' ] [ 'self' ]
663663 assert_hash_equals ( json_response ,
664664 {
665665 'links' => {
0 commit comments