summaryrefslogtreecommitdiff
path: root/spec/support/helpers/graphql_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/graphql_helpers.rb')
-rw-r--r--spec/support/helpers/graphql_helpers.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb
index 9d745f2cb70..b2fc6ae3286 100644
--- a/spec/support/helpers/graphql_helpers.rb
+++ b/spec/support/helpers/graphql_helpers.rb
@@ -17,6 +17,9 @@ module GraphqlHelpers
# makes an underscored string look like a fieldname
# "merge_request" => "mergeRequest"
def self.fieldnamerize(underscored_field_name)
+ # Skip transformation for a field with leading underscore
+ return underscored_field_name.to_s if underscored_field_name.start_with?('_')
+
underscored_field_name.to_s.camelize(:lower)
end
@@ -717,7 +720,7 @@ module GraphqlHelpers
end
def allow_high_graphql_transaction_threshold
- stub_const("Gitlab::QueryLimiting::Transaction::THRESHOLD", 1000)
+ allow(Gitlab::QueryLimiting::Transaction).to receive(:threshold).and_return(1000)
end
def allow_high_graphql_query_size