MCPcopy
hub / github.com/gotify/server / BeforeTest

Method BeforeTest

api/message_test.go:33–41  ·  view source on GitHub ↗
(suiteName, testName string)

Source from the content-addressed store, hash-verified

31}
32
33func (s *MessageSuite) BeforeTest(suiteName, testName string) {
34 mode.Set(mode.TestDev)
35 s.recorder = httptest.NewRecorder()
36 s.ctx, _ = gin.CreateTestContext(s.recorder)
37 s.ctx.Request = httptest.NewRequest("GET", "/irrelevant", nil)
38 s.db = testdb.NewDB(s.T())
39 s.notifiedMessage = nil
40 s.a = &MessageAPI{DB: s.db, Notifier: s}
41}
42
43func (s *MessageSuite) AfterTest(string, string) {
44 s.db.Close()

Callers

nothing calls this directly

Calls 2

SetFunction · 0.92
NewDBFunction · 0.92

Tested by

no test coverage detected