Skip to content

Rename let binding in GraphQL shared_example

What does this MR do and why?

renames expected_results binding to all_records for greater clarity following feedback from @caalberts.

Related Issue(s)

Rename expected_results to all_records in sorted_paginated_query_shared_examples.rb

Discussion

I find it a little surprising that expected results have 4 elements, even though we are passing first: 3 through first_param. It works as expected_results is filtered out further in https://gitlab.com/gitlab-org/gitlab/blob/master/spec/support/shared_examples/graphql/sorted_paginated_query_shared_examples.rb#L109.

@alexkalderimis What do you think of renaming expected_results to all_records or something else to make this less surprising, if it's not too widespread a change?

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Philip Cunningham

Merge request reports