mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: set domain verified if domain policy does not require validation (#4061)
* fix: set domain verified if domain policy does not require validation * handle domain claimed
This commit is contained in:
@@ -733,6 +733,39 @@ func TestUserProjection_reduces(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reduceDomainClaimed",
|
||||
args: args{
|
||||
event: getEvent(testEvent(
|
||||
repository.EventType(user.UserDomainClaimedType),
|
||||
user.AggregateType,
|
||||
[]byte(`{
|
||||
"username": "id@temporary.domain"
|
||||
}`),
|
||||
), user.DomainClaimedEventMapper),
|
||||
},
|
||||
reduce: (&userProjection{}).reduceDomainClaimed,
|
||||
want: wantReduce{
|
||||
aggregateType: user.AggregateType,
|
||||
sequence: 15,
|
||||
previousSequence: 10,
|
||||
projection: UserTable,
|
||||
executer: &testExecuter{
|
||||
executions: []execution{
|
||||
{
|
||||
expectedStmt: "UPDATE projections.users2 SET (change_date, username, sequence) = ($1, $2, $3) WHERE (id = $4) AND (instance_id = $5)",
|
||||
expectedArgs: []interface{}{
|
||||
anyArg{},
|
||||
"id@temporary.domain",
|
||||
uint64(15),
|
||||
"agg-id",
|
||||
"instance-id",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reduceHumanProfileChanged",
|
||||
args: args{
|
||||
|
Reference in New Issue
Block a user