2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-20 22:21:38 +01:00
|
|
|
describe 'graphql' do
|
2020-08-05 18:40:47 +02:00
|
|
|
let(:current_defn) { API::V2::Schema.to_definition }
|
2023-04-19 10:55:16 +02:00
|
|
|
let(:printout_defn) { Rails.root.join('app', 'graphql', 'schema.graphql').read }
|
2018-11-20 22:21:38 +01:00
|
|
|
|
|
|
|
it "update the printed schema with `bin/rake graphql:schema:idl`" do
|
|
|
|
result = GraphQL::SchemaComparator.compare(current_defn, printout_defn)
|
|
|
|
expect(result.identical?).to be_truthy
|
|
|
|
end
|
|
|
|
end
|