mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-06 16:06:56 +00:00
20 lines
375 B
Go
20 lines
375 B
Go
|
package mutate
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"gotest.tools/assert"
|
||
|
)
|
||
|
|
||
|
func TestRemoveAnchor_ConditionAnchor(t *testing.T) {
|
||
|
assert.Equal(t, removeAnchor("(abc)"), "abc")
|
||
|
}
|
||
|
|
||
|
func TestRemoveAnchor_ExistanceAnchor(t *testing.T) {
|
||
|
assert.Equal(t, removeAnchor("^(abc)"), "abc")
|
||
|
}
|
||
|
|
||
|
func TestRemoveAnchor_EmptyExistanceAnchor(t *testing.T) {
|
||
|
assert.Equal(t, removeAnchor("^()"), "")
|
||
|
}
|