feat: demo flags (#1084)

This commit is contained in:
Jonas Plum
2024-07-21 04:07:23 +02:00
committed by GitHub
parent 91429effe2
commit a9e885598c
16 changed files with 217 additions and 108 deletions

View File

@@ -10,6 +10,20 @@ import (
catalystTesting "github.com/SecurityBrewery/catalyst/testing"
)
func TestHasFlag(t *testing.T) {
t.Parallel()
catalystApp, _, cleanup := catalystTesting.App(t)
defer cleanup()
// stage 1
assert.False(t, app.HasFlag(catalystApp, "test"))
// stage 2
require.NoError(t, app.SetFlags(catalystApp, []string{"test"}))
assert.True(t, app.HasFlag(catalystApp, "test"))
}
func Test_flags(t *testing.T) {
t.Parallel()