From e7e7a2b95b77320d8da032f859acce56cbb92bc0 Mon Sep 17 00:00:00 2001 From: Sergey Date: Fri, 21 Jun 2024 17:08:00 +0300 Subject: [PATCH] chore: add chain query test --- pkg/config/query_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pkg/config/query_test.go diff --git a/pkg/config/query_test.go b/pkg/config/query_test.go new file mode 100644 index 0000000..3751327 --- /dev/null +++ b/pkg/config/query_test.go @@ -0,0 +1,15 @@ +package config + +import ( + "github.com/stretchr/testify/assert" + "testing" +) + +func TestChainQueryEnabled(t *testing.T) { + t.Parallel() + + queries := Queries{"query1": true, "query2": false} + assert.True(t, queries.Enabled("query1")) + assert.False(t, queries.Enabled("query2")) + assert.True(t, queries.Enabled("query3")) +}