diff options
Diffstat (limited to 'spec/graphql/types/notes/noteable_type_spec.rb')
-rw-r--r-- | spec/graphql/types/notes/noteable_type_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/graphql/types/notes/noteable_type_spec.rb b/spec/graphql/types/notes/noteable_type_spec.rb index 4a81f45bd4e..88d8eae56d1 100644 --- a/spec/graphql/types/notes/noteable_type_spec.rb +++ b/spec/graphql/types/notes/noteable_type_spec.rb @@ -1,14 +1,23 @@ # frozen_string_literal: true + require 'spec_helper' describe Types::Notes::NoteableType do - specify { expect(described_class).to have_graphql_fields(:notes, :discussions) } + it 'exposes the expected fields' do + expected_fields = %i[ + discussions + notes + ] + + expect(described_class).to have_graphql_fields(*expected_fields) + end describe ".resolve_type" do it 'knows the correct type for objects' do expect(described_class.resolve_type(build(:issue), {})).to eq(Types::IssueType) expect(described_class.resolve_type(build(:merge_request), {})).to eq(Types::MergeRequestType) expect(described_class.resolve_type(build(:design), {})).to eq(Types::DesignManagement::DesignType) + expect(described_class.resolve_type(build(:alert_management_alert), {})).to eq(Types::AlertManagement::AlertType) end end end |