Welcome to mirror list, hosted at ThFree Co, Russian Federation.

noteable_type_spec.rb « notes « types « graphql « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4a81f45bd4ebcf3120b7be6e499f88ef6b2cf370 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true
require 'spec_helper'

describe Types::Notes::NoteableType do
  specify { expect(described_class).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)
      expect(described_class.resolve_type(build(:design), {})).to eq(Types::DesignManagement::DesignType)
    end
  end
end