aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/util_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dashboard/app/util_test.go')
-rw-r--r--dashboard/app/util_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/dashboard/app/util_test.go b/dashboard/app/util_test.go
index f9e2ad660..2040f879e 100644
--- a/dashboard/app/util_test.go
+++ b/dashboard/app/util_test.go
@@ -357,9 +357,10 @@ func (c *Ctx) httpRequest(method, url, body, contentType string,
}
r = registerRequest(r, c)
r = r.WithContext(c.transformContext(r.Context()))
- if access == AccessAdmin {
+ switch access {
+ case AccessAdmin:
aetest.Login(makeUser(AuthorizedAdmin), r)
- } else if access == AccessUser {
+ case AccessUser:
aetest.Login(makeUser(AuthorizedUser), r)
}
w := httptest.NewRecorder()