mirror of
https://github.com/pushbits/server.git
synced 2025-05-10 07:26:59 +02:00
add unittest for create notification
This commit is contained in:
parent
c1631dd53e
commit
ea13efca02
5 changed files with 97 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue