summaryrefslogtreecommitdiff
path: root/spec/graphql/types/snippets/file_input_type_spec.rb
blob: c7d4909b54252d56bcbdc594b6dcfc1064497a75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Types::Snippets::FileInputType do
  specify { expect(described_class.graphql_name).to eq('SnippetFileInputType') }

  it 'has the correct arguments' do
    expect(described_class.arguments.keys).to match_array(%w[filePath action previousPath content])
  end

  it 'sets the type of action argument to FileInputActionEnum' do
    expect(described_class.arguments['action'].type.of_type).to eq(Types::Snippets::FileInputActionEnum)
  end
end