Skip to content

Commit

Permalink
test: fix tests for getting navigation actions usecase (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ochom committed Aug 9, 2021
1 parent 7868467 commit 71c7d15
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions pkg/onboarding/usecases/profile_unit_test.go
Expand Up @@ -4067,20 +4067,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) {
Expand Down Expand Up @@ -4123,7 +4123,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
}
}
Expand Down

0 comments on commit 71c7d15

Please sign in to comment.