spec/graphql/relay/relation_connection_spec.rb in graphql-1.4.3 vs spec/graphql/relay/relation_connection_spec.rb in graphql-1.4.4

- old
+ new

@@ -95,9 +95,14 @@ result = star_wars_query(query_string, "before" => last_cursor, "last" => 10) assert_equal(["Death Star", "Shield Generator"], get_names(result)) result = star_wars_query(query_string, "last" => 2) assert_equal(["Shield Generator", "Headquarters"], get_names(result)) + + result = star_wars_query(query_string, "last" => 10) + assert_equal(["Death Star", "Shield Generator", "Headquarters"], get_names(result)) + assert_equal(false, result["data"]["empire"]["bases"]["pageInfo"]["hasNextPage"]) + assert_equal(false, result["data"]["empire"]["bases"]["pageInfo"]["hasPreviousPage"]) end it 'handles cursors beyond the bounds of the array' do overreaching_cursor = Base64.strict_encode64("100") result = star_wars_query(query_string, "after" => overreaching_cursor, "first" => 2)