fix(projection): correct type cast of user grant reactivated (#7123)

* fix(projection): correct type cast of user grant reactivated

* test: correct mapper
This commit is contained in:
Silvan 2023-12-31 14:03:23 +01:00 committed by GitHub
parent 45ccdcfa99
commit 6d3ce8d5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ func (p *userGrantProjection) reduceDeactivated(event eventstore.Event) (*handle
}
func (p *userGrantProjection) reduceReactivated(event eventstore.Event) (*handler.Statement, error) {
if _, ok := event.(*usergrant.UserGrantDeactivatedEvent); !ok {
if _, ok := event.(*usergrant.UserGrantReactivatedEvent); !ok {
return nil, zerrors.ThrowInvalidArgumentf(nil, "PROJE-DGsKh", "reduce.wrong.event.type %s", usergrant.UserGrantReactivatedType)
}

View File

@ -345,7 +345,7 @@ func TestUserGrantProjection_reduces(t *testing.T) {
usergrant.UserGrantReactivatedType,
usergrant.AggregateType,
nil,
), usergrant.UserGrantDeactivatedEventMapper),
), usergrant.UserGrantReactivatedEventMapper),
},
reduce: (&userGrantProjection{}).reduceReactivated,
want: wantReduce{