Changeset 0.28.4 (#190)
This commit is contained in:
@@ -44,11 +44,12 @@ func setupNotifHarness(t *testing.T) *notifHarness {
|
||||
} else {
|
||||
stores = postgres.NewStores(database.TestDB)
|
||||
}
|
||||
userCache := middleware.NewUserStatusCache()
|
||||
|
||||
r := gin.New()
|
||||
api := r.Group("/api/v1")
|
||||
protected := api.Group("")
|
||||
protected.Use(middleware.Auth(cfg))
|
||||
protected.Use(middleware.Auth(cfg, stores.Users, userCache))
|
||||
|
||||
notifH := NewNotificationHandler(stores, nil) // no hub in tests
|
||||
protected.GET("/notifications", notifH.List)
|
||||
|
||||
Reference in New Issue
Block a user