Skip to content

Commit

Permalink
chore: add chain query test
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed Jun 21, 2024
1 parent 383825b commit e7e7a2b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions pkg/config/query_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package config

import (
"github.com/stretchr/testify/assert"

Check failure on line 4 in pkg/config/query_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
"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"))
}

0 comments on commit e7e7a2b

Please sign in to comment.