mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:57:33 +00:00
fix: member projections (#2771)
* fix(projections): start member projections * fix(projection): member roles as string array * fix member tests
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/caos/zitadel/internal/eventstore/handler"
|
||||
"github.com/caos/zitadel/internal/eventstore/repository"
|
||||
"github.com/caos/zitadel/internal/repository/project"
|
||||
"github.com/lib/pq"
|
||||
)
|
||||
|
||||
func TestProjectMemberProjection_reduces(t *testing.T) {
|
||||
@@ -44,7 +45,7 @@ func TestProjectMemberProjection_reduces(t *testing.T) {
|
||||
expectedStmt: "INSERT INTO zitadel.projections.project_members (user_id, roles, creation_date, change_date, sequence, resource_owner, project_id) VALUES ($1, $2, $3, $4, $5, $6, $7)",
|
||||
expectedArgs: []interface{}{
|
||||
"user-id",
|
||||
[]string{"role"},
|
||||
pq.StringArray{"role"},
|
||||
anyArg{},
|
||||
anyArg{},
|
||||
uint64(15),
|
||||
@@ -79,7 +80,7 @@ func TestProjectMemberProjection_reduces(t *testing.T) {
|
||||
{
|
||||
expectedStmt: "UPDATE zitadel.projections.project_members SET (roles, change_date, sequence) = ($1, $2, $3) WHERE (user_id = $4) AND (project_id = $5)",
|
||||
expectedArgs: []interface{}{
|
||||
[]string{"role", "changed"},
|
||||
pq.StringArray{"role", "changed"},
|
||||
anyArg{},
|
||||
uint64(15),
|
||||
"user-id",
|
||||
|
Reference in New Issue
Block a user