From fcf5e6223bad045c213bb0f374cbcac13fb8b6f9 Mon Sep 17 00:00:00 2001 From: Bertocq Date: Wed, 31 Jan 2018 18:31:22 +0100 Subject: [PATCH] Ensure graphql doesnt return valuation comments --- spec/lib/graphql_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/lib/graphql_spec.rb b/spec/lib/graphql_spec.rb index b86e06085..3c48957de 100644 --- a/spec/lib/graphql_spec.rb +++ b/spec/lib/graphql_spec.rb @@ -421,6 +421,16 @@ describe 'Consul Schema' do expect(Time.zone.parse(received_timestamps.first)).to eq Time.zone.parse("2017-12-31 9:00:00") end + + it 'does not include valuation comments' do + visible_comment = create(:comment) + valuation_comment = create(:comment, :valuation) + + response = execute('{ comments { edges { node { body } } } }') + received_comments = extract_fields(response, 'comments', 'body') + + expect(received_comments).not_to include(valuation_comment.body) + end end describe 'Geozones' do