From 9f4e35e23722db66eea07f7a04419c6973e13cab Mon Sep 17 00:00:00 2001 From: Caio <117518+caiosba@users.noreply.github.com> Date: Tue, 27 Aug 2024 13:23:41 -0300 Subject: [PATCH] Fixing flaky test --- test/controllers/graphql_controller_11_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/controllers/graphql_controller_11_test.rb b/test/controllers/graphql_controller_11_test.rb index 2cad8e262..f1c86351d 100644 --- a/test/controllers/graphql_controller_11_test.rb +++ b/test/controllers/graphql_controller_11_test.rb @@ -132,10 +132,10 @@ def teardown post :create, params: { query: query } assert_response :success response = JSON.parse(@response.body)['data']['me'] - data = response['accessible_teams']['edges'].collect{ |edge| edge['node']['dbid'] }.sort + data = response['accessible_teams']['edges'] assert_equal 2, data.size - assert_equal team1.id, data[0] - assert_equal team2.id, data[1] + assert_equal team1.id, data[0]['node']['dbid'] + assert_equal team2.id, data[1]['node']['dbid'] assert_equal 2, response['accessible_teams_count'] end