From 3227b7e18464b476281d5990983e88724ca92881 Mon Sep 17 00:00:00 2001 From: taitus Date: Wed, 6 Nov 2024 13:29:28 +0100 Subject: [PATCH] Ensure that we are testing a belongs_to association --- spec/graphql/types/query_type_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/graphql/types/query_type_spec.rb b/spec/graphql/types/query_type_spec.rb index 9c50e04bc..37888ef32 100644 --- a/spec/graphql/types/query_type_spec.rb +++ b/spec/graphql/types/query_type_spec.rb @@ -52,11 +52,11 @@ describe Types::QueryType do end it "hides confidential belongs_to associations" do - create(:failed_census_call, user: user) + user.geozone = create(:geozone) expect do - run_graphql_field("User.failed_census_calls.id", user) - end.to raise_error GraphQL::Testing::Helpers::FieldNotDefinedError, /no field named `failed_census_calls`/ + run_graphql_field("User.geozone.id", user) + end.to raise_error GraphQL::Testing::Helpers::FieldNotDefinedError, /no field named `geozone`/ end it "hides confidential has_many associations" do