PublicDashboards: refactor following naming convention for services (#57625)

This commit is contained in:
Ezequiel Victorero
2022-10-25 21:40:42 -03:00
committed by GitHub
parent 5879805e4b
commit 860380d893
15 changed files with 247 additions and 245 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("PublicDashboardEnabledExistsByAccessToken", mock.Anything, mock.Anything).Return(tt.AccessTokenExists, tt.AccessTokenExistsErr)
publicdashboardService.On("ExistsEnabledByAccessToken", 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)
@@ -131,7 +131,7 @@ func TestSetPublicDashboardOrgIdOnContext(t *testing.T) {
for _, tt := range tests {
t.Run(tt.Name, func(t *testing.T) {
publicdashboardService := &publicdashboards.FakePublicDashboardService{}
publicdashboardService.On("GetPublicDashboardOrgId", mock.Anything, tt.AccessToken).Return(
publicdashboardService.On("GetOrgIdByAccessToken", mock.Anything, tt.AccessToken).Return(
tt.OrgIdResp,
tt.ErrorResp,
)