From 6d3ce8d5ab47a3d3685e18cbed4f260cc9328e87 Mon Sep 17 00:00:00 2001 From: Silvan Date: Sun, 31 Dec 2023 14:03:23 +0100 Subject: [PATCH] fix(projection): correct type cast of user grant reactivated (#7123) * fix(projection): correct type cast of user grant reactivated * test: correct mapper --- internal/query/projection/user_grant.go | 2 +- internal/query/projection/user_grant_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/query/projection/user_grant.go b/internal/query/projection/user_grant.go index c3ae22c487..963cad395d 100644 --- a/internal/query/projection/user_grant.go +++ b/internal/query/projection/user_grant.go @@ -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) } diff --git a/internal/query/projection/user_grant_test.go b/internal/query/projection/user_grant_test.go index 128a97fe5c..22644d6e8c 100644 --- a/internal/query/projection/user_grant_test.go +++ b/internal/query/projection/user_grant_test.go @@ -345,7 +345,7 @@ func TestUserGrantProjection_reduces(t *testing.T) { usergrant.UserGrantReactivatedType, usergrant.AggregateType, nil, - ), usergrant.UserGrantDeactivatedEventMapper), + ), usergrant.UserGrantReactivatedEventMapper), }, reduce: (&userGrantProjection{}).reduceReactivated, want: wantReduce{