spec/graphql/schema/timeout_middleware_spec.rb in graphql-1.1.0 vs spec/graphql/schema/timeout_middleware_spec.rb in graphql-1.2.0

- old
+ new

@@ -164,11 +164,11 @@ end describe "with a custom block" do let(:timeout_middleware) { GraphQL::Schema::TimeoutMiddleware.new(max_seconds: max_seconds) do |err, query| - raise("Query timed out after 2s: #{query.class.name} on #{query.context.ast_node.alias}") + raise("Query timed out after 2s: #{query.operations.count} on #{query.context.ast_node.alias}") end } let(:query_string) {%| { a: sleepFor(seconds: 0.4) @@ -179,9 +179,9 @@ } |} it "calls the block" do err = assert_raises(RuntimeError) { result } - assert_equal "Query timed out after 2s: GraphQL::Query on d", err.message + assert_equal "Query timed out after 2s: 1 on d", err.message end end end