add unittest for create notification

This commit is contained in:
Cubicroot 2021-07-22 19:22:51 +02:00
parent c1631dd53e
commit ea13efca02
5 changed files with 97 additions and 0 deletions

View file

@ -20,6 +20,7 @@ import (
var TestApplicationHandler *ApplicationHandler
var TestUsers []*model.User
var TestDatabase *database.Database
var TestNotificationHandler *NotificationHandler
// Collect all created applications to check & delete them later
var SuccessAplications map[uint][]model.Application
@ -56,6 +57,10 @@ func TestMain(m *testing.M) {
TestUsers = mockups.GetUsers(config)
SuccessAplications = make(map[uint][]model.Application)
TestNotificationHandler = &NotificationHandler{
DB: TestDatabase,
DP: &mockups.MockDispatcher{},
}
// Run
m.Run()
cleanUp()