spec/graphql/tracing/platform_tracing_spec.rb in graphql-1.7.14 vs spec/graphql/tracing/platform_tracing_spec.rb in graphql-1.8.0.pre1
- old
+ new
@@ -39,75 +39,16 @@
it "calls the platform's own method with its own keys" do
schema.execute(" { cheese(id: 1) { flavor } }")
expected_trace = [
"em",
- "am",
"l",
"p",
"v",
- "aq",
- "eq",
- "Q.c", # notice that the flavor is skipped
- "eql",
- ]
- assert_equal expected_trace, CustomPlatformTracer::TRACE
- end
- end
-
- describe "by default, scalar fields are not traced" do
- let(:schema) {
- Dummy::Schema.redefine {
- use(CustomPlatformTracer)
- }
- }
-
- before do
- CustomPlatformTracer::TRACE.clear
- end
-
- it "only traces traceTrue, not traceFalse or traceNil" do
- schema.execute(" { tracingScalar { traceNil traceFalse traceTrue } }")
- expected_trace = [
- "em",
"am",
- "l",
- "p",
- "v",
"aq",
"eq",
- "Q.t",
- "T.t",
- "eql",
- ]
- assert_equal expected_trace, CustomPlatformTracer::TRACE
- end
- end
-
- describe "when scalar fields are traced by default, they are unless specified" do
- let(:schema) {
- Dummy::Schema.redefine {
- use(CustomPlatformTracer, trace_scalars: true)
- }
- }
-
- before do
- CustomPlatformTracer::TRACE.clear
- end
-
- it "traces traceTrue and traceNil but not traceFalse" do
- schema.execute(" { tracingScalar { traceNil traceFalse traceTrue } }")
- expected_trace = [
- "em",
- "am",
- "l",
- "p",
- "v",
- "aq",
- "eq",
- "Q.t",
- "T.t",
- "T.t",
+ "Q.c", # notice that the flavor is skipped
"eql",
]
assert_equal expected_trace, CustomPlatformTracer::TRACE
end
end