mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: handle default org id (#3769)
This commit is contained in:
@@ -51,15 +51,15 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reduceGlobalOrgSet",
|
||||
name: "reduceDefaultOrgSet",
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(instance.GlobalOrgSetEventType),
|
||||
repository.EventType(instance.DefaultOrgSetEventType),
|
||||
instance.AggregateType,
|
||||
[]byte(`{"globalOrgId": "orgid"}`),
|
||||
), instance.GlobalOrgSetMapper),
|
||||
[]byte(`{"orgId": "orgid"}`),
|
||||
), instance.DefaultOrgSetMapper),
|
||||
},
|
||||
reduce: (&InstanceProjection{}).reduceGlobalOrgSet,
|
||||
reduce: (&InstanceProjection{}).reduceDefaultOrgSet,
|
||||
want: wantReduce{
|
||||
projection: InstanceProjectionTable,
|
||||
aggregateType: eventstore.AggregateType("instance"),
|
||||
@@ -68,7 +68,7 @@ func TestInstanceProjection_reduces(t *testing.T) {
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPDATE projections.instances SET (change_date, sequence, global_org_id) = ($1, $2, $3) WHERE (id = $4)",
|
||||
expectedStmt: "UPDATE projections.instances SET (change_date, sequence, default_org_id) = ($1, $2, $3) WHERE (id = $4)",
|
||||
expectedArgs: []interface{}{
|
||||
anyArg{},
|
||||
uint64(15),
|
||||
|
Reference in New Issue
Block a user