PublicDashboards: refactor service (#57372)

This commit is contained in:
Ezequiel Victorero
2022-10-21 09:37:38 -03:00
committed by GitHub
parent f161c5407a
commit 5b9959014c
13 changed files with 1605 additions and 1679 deletions
@@ -74,7 +74,7 @@ func TestRequiresExistingAccessToken(t *testing.T) {
for _, tt := range tests {
t.Run(tt.Name, func(t *testing.T) {
publicdashboardService := &publicdashboards.FakePublicDashboardService{}
publicdashboardService.On("AccessTokenExists", mock.Anything, mock.Anything).Return(tt.AccessTokenExists, tt.AccessTokenExistsErr)
publicdashboardService.On("PublicDashboardEnabledExistsByAccessToken", mock.Anything, mock.Anything).Return(tt.AccessTokenExists, tt.AccessTokenExistsErr)
params := map[string]string{":accessToken": tt.AccessToken}
mw := RequiresExistingAccessToken(publicdashboardService)
_, resp := runMw(t, nil, "GET", tt.Path, params, mw)