Skip to content

Commit

Permalink
Improve GraphQL specs
Browse files Browse the repository at this point in the history
  • Loading branch information
y9v committed Sep 11, 2024
1 parent 9c460bc commit 3562af9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,8 @@
)
end

let(:queries) { [query] }

it 'returns queries' do
expect(dd_multiplex.queries).to eq(queries)
expect(dd_multiplex.queries).to eq([query])
end
end
end
4 changes: 2 additions & 2 deletions spec/datadog/appsec/contrib/graphql/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
RSpec.describe Datadog::AppSec::Contrib::GraphQL::Integration do
describe '.ast_node_classes_defined?' do
it 'returns true when all AST node classes are defined' do
expect(described_class.ast_node_classes_defined?).to eq(true)
expect(described_class.ast_node_classes_defined?).to be(true)
end

it 'returns false when at least one of AST node classes is not defined' do
hide_const('GraphQL::Language::Nodes::Field')
expect(described_class.ast_node_classes_defined?).to eq(false)
expect(described_class.ast_node_classes_defined?).to be(false)
end
end
end

0 comments on commit 3562af9

Please sign in to comment.