summaryrefslogtreecommitdiff
path: root/spec/graphql/types/notes/noteable_type_spec.rb
blob: d10c79b5344fe433eff26523820226d7416ecdb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true
require 'spec_helper'

describe Types::Notes::NoteableType do
  it { is_expected.to have_graphql_fields(:notes, :discussions) }

  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)
    end
  end
end