Ensure that we are testing a belongs_to association

This commit is contained in:
taitus
2024-11-06 13:29:28 +01:00
parent 78d36dd563
commit 3227b7e184

View File

@@ -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