From c2e4294c3617a95c38fc42dec4814350f174201a Mon Sep 17 00:00:00 2001 From: ochom Date: Fri, 6 Aug 2021 10:09:58 +0300 Subject: [PATCH] test: fix tests for getting navigation actions usecase --- pkg/onboarding/usecases/profile_unit_test.go | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pkg/onboarding/usecases/profile_unit_test.go b/pkg/onboarding/usecases/profile_unit_test.go index 4c807b45..cb24f31f 100644 --- a/pkg/onboarding/usecases/profile_unit_test.go +++ b/pkg/onboarding/usecases/profile_unit_test.go @@ -4341,20 +4341,20 @@ func TestProfileUseCaseImpl_GetNavigationActions(t *testing.T) { want: nil, wantErr: true, }, - // { - // name: "happy got user navigation actions", - // args: args{ctx: ctx}, - // want: &dto.GroupedNavigationActions{ - // Primary: []domain.NavigationAction{ - // domain.HomeNavAction, - // domain.HelpNavAction, - // }, - // Secondary: []domain.NavigationAction{ - // agentNav, - // }, - // }, - // wantErr: true, - // }, + { + name: "happy got user navigation actions", + args: args{ctx: ctx}, + want: &dto.GroupedNavigationActions{ + Primary: []domain.NavigationAction{ + domain.HomeNavAction, + domain.HelpNavAction, + }, + Secondary: []domain.NavigationAction{ + agentNav, + }, + }, + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -4397,7 +4397,7 @@ func TestProfileUseCaseImpl_GetNavigationActions(t *testing.T) { } fakeRepo.GetRolesByIDsFn = func(ctx context.Context, roleIDs []string) (*[]profileutils.Role, error) { return &[]profileutils.Role{ - {Scopes: []string{"agent.view", "agent.register"}}, + {Scopes: []string{"agent.view", "agent.register"}, Active: true}, }, nil } }