add tests for config

This commit is contained in:
Cubicroot 2021-06-11 10:13:17 +02:00
parent d39e2ea9a4
commit e87f775b1d
11 changed files with 461 additions and 6 deletions

View file

@ -0,0 +1,17 @@
package mockups
import (
"github.com/pushbits/server/internal/configuration"
"github.com/pushbits/server/internal/dispatcher"
)
// GetMatrixDispatcher creates and returns a matrix dispatcher
func GetMatrixDispatcher(homeserver, username, password string) (*dispatcher.Dispatcher, error) {
db, err := GetEmptyDatabase()
if err != nil {
return nil, err
}
return dispatcher.Create(db, homeserver, username, password, configuration.Formatting{})
}