Sha256: 54fcfaa2eb227b1e5ecb1b38e652fb9a98fa29e2f2286b97d8f5bbda714dd328
Contents?: true
Size: 764 Bytes
Versions: 14
Compression:
Stored size: 764 Bytes
Contents
require "spec_helper" describe GraphQL::Schema::CatchallMiddleware do let(:result) { DummySchema.execute(query_string) } let(:query_string) {%| query noMilk { error }|} before do DummySchema.middleware << GraphQL::Schema::CatchallMiddleware end after do DummySchema.middleware.delete(GraphQL::Schema::CatchallMiddleware) end describe "rescuing errors" do let(:errors) { query.context.errors } it "turns into error messages" do expected = { "data" => { "error" => nil }, "errors"=> [ { "message"=>"Internal error", "locations"=>[{"line"=>1, "column"=>17}], "path"=>["error"] }, ] } assert_equal(expected, result) end end end
Version data entries
14 entries across 14 versions & 1 rubygems