Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions datastream/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ func TestPartialCompany_ReplacesBillingProductIDs(t *testing.T) {
merged, err := PartialCompany(existing, partial)
require.NoError(t, err)

assert.Equal(t, []string{"bp-10", "bp-20"}, merged.BillingProductIDs)
assert.Equal(t, []string{"bp-1"}, existing.BillingProductIDs)
assert.Equal(t, rulesengine.JSONSlice[string]{"bp-10", "bp-20"}, merged.BillingProductIDs)
assert.Equal(t, rulesengine.JSONSlice[string]{"bp-1"}, existing.BillingProductIDs)
}

func TestPartialCompany_ReplacesPlanIDs(t *testing.T) {
Expand All @@ -200,8 +200,8 @@ func TestPartialCompany_ReplacesPlanIDs(t *testing.T) {
merged, err := PartialCompany(existing, partial)
require.NoError(t, err)

assert.Equal(t, []string{"plan-99", "plan-100"}, merged.PlanIDs)
assert.Equal(t, []string{"plan-1"}, existing.PlanIDs)
assert.Equal(t, rulesengine.JSONSlice[string]{"plan-99", "plan-100"}, merged.PlanIDs)
assert.Equal(t, rulesengine.JSONSlice[string]{"plan-1"}, existing.PlanIDs)
}

func TestPartialCompany_ReplacesPlanVersionIDs(t *testing.T) {
Expand All @@ -211,8 +211,8 @@ func TestPartialCompany_ReplacesPlanVersionIDs(t *testing.T) {
merged, err := PartialCompany(existing, partial)
require.NoError(t, err)

assert.Equal(t, []string{"pv-99"}, merged.PlanVersionIDs)
assert.Equal(t, []string{"pv-1"}, existing.PlanVersionIDs)
assert.Equal(t, rulesengine.JSONSlice[string]{"pv-99"}, merged.PlanVersionIDs)
assert.Equal(t, rulesengine.JSONSlice[string]{"pv-1"}, existing.PlanVersionIDs)
}

func TestPartialCompany_NullBasePlanID(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/redis/go-redis/v9 v9.19.0
github.com/schematichq/rulesengine v0.1.14
github.com/schematichq/rulesengine v0.1.16
github.com/schematichq/schematic-datastream-ws v0.2.8
github.com/stretchr/testify v1.11.1
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/redis/go-redis/v9 v9.19.0 h1:XPVaaPSnG6RhYf7p+rmSa9zZfeVAnWsH5h3lxthOm/k=
github.com/redis/go-redis/v9 v9.19.0/go.mod h1:v/M13XI1PVCDcm01VtPFOADfZtHf8YW3baQf57KlIkA=
github.com/schematichq/rulesengine v0.1.14 h1:lCBfBwxxvsF9OkcPrnP6c1y4hGAHEzr3acQX3IhYx+k=
github.com/schematichq/rulesengine v0.1.14/go.mod h1:HmweBgjg+kVe6VuNMLc7FISHFF0wzr5cVGLAxlVP8+4=
github.com/schematichq/rulesengine v0.1.16 h1:bwVLALS8Jrc0+Fhsz7/Q6eZRMcBA8J+h3e0tzd6xBT8=
github.com/schematichq/rulesengine v0.1.16/go.mod h1:HmweBgjg+kVe6VuNMLc7FISHFF0wzr5cVGLAxlVP8+4=
github.com/schematichq/schematic-datastream-ws v0.2.8 h1:+98OiNsQ/slM6bJlzZhu4SfguCTjK2u+WXGjfN7mm4Q=
github.com/schematichq/schematic-datastream-ws v0.2.8/go.mod h1:NKrg326C9YfCDOI84On5GZhvrovzDpFCzW8wdBwPZ3g=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
Expand Down
Loading