2023-11-23 09:05:44 -05:00
|
|
|
package controllers
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/go-playground/assert/v2"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestPlanEventMatch(t *testing.T) {
|
2023-11-23 13:22:16 -05:00
|
|
|
events := []string{"services.v2.events.plan.updated", "services.v2.events.plan.destroyed", "services.v2.events.plan.created"}
|
2023-11-23 09:05:44 -05:00
|
|
|
|
|
|
|
for _, event := range events {
|
2023-11-23 13:22:16 -05:00
|
|
|
assert.Equal(t, eventMatch("plan", event), true)
|
2023-11-23 09:05:44 -05:00
|
|
|
}
|
|
|
|
}
|