spec/integration/rails/graphql/schema_spec.rb in graphql-1.8.18 vs spec/integration/rails/graphql/schema_spec.rb in graphql-1.9.0.pre1
- old
+ new
@@ -16,12 +16,12 @@
it "adds handlers to the rescue middleware" do
schema_defn = schema.graphql_definition
rescue_middleware = schema_defn.middleware.first
assert_equal(1, rescue_middleware.rescue_table.length)
# normally, you'd use a real class, not a symbol:
- schema_defn.rescue_from(:error_class, :another_err_class) { "my custom message" }
- assert_equal(3, rescue_middleware.rescue_table.length)
+ schema_defn.rescue_from(:error_class) { "my custom message" }
+ assert_equal(2, rescue_middleware.rescue_table.length)
end
end
describe "#find" do
it "finds a member using a string path" do
@@ -71,13 +71,16 @@
it "prints out the schema definition" do
assert_equal schema.to_definition, GraphQL::Schema::Printer.print_schema(schema)
end
end
- describe "#subscription" do
- it "calls fields on the subscription type" do
- res = schema.execute("subscription { test }")
- assert_equal("Test", res["data"]["test"])
+ # Interpreter has subscription support hardcoded, it doesn't just call through.
+ if !TESTING_INTERPRETER
+ describe "#subscription" do
+ it "calls fields on the subscription type" do
+ res = schema.execute("subscription { test }")
+ assert_equal("Test", res["data"]["test"])
+ end
end
end
describe "#resolve_type" do
describe "when the return value is nil" do