mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-04-07 06:57:38 +03:00
Docblocks, a handful of tests, but not enough
This commit is contained in:
parent
fa9d6444f5
commit
e3dfea1991
9 changed files with 121 additions and 12 deletions
|
@ -6,7 +6,6 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/stretchr/testify/require"
|
||||
"heckel.io/ntfy/config"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
|
@ -393,13 +392,13 @@ func TestServer_PublishFirebase(t *testing.T) {
|
|||
time.Sleep(500 * time.Millisecond) // Time for sends
|
||||
}
|
||||
|
||||
func newTestConfig(t *testing.T) *config.Config {
|
||||
conf := config.New(":80")
|
||||
func newTestConfig(t *testing.T) *Config {
|
||||
conf := NewConfig(":80")
|
||||
conf.CacheFile = filepath.Join(t.TempDir(), "cache.db")
|
||||
return conf
|
||||
}
|
||||
|
||||
func newTestServer(t *testing.T, config *config.Config) *Server {
|
||||
func newTestServer(t *testing.T, config *Config) *Server {
|
||||
server, err := New(config)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue