mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-01 10:21:19 +01:00
Add more unit tests
This commit is contained in:
11 files changed
+162
-83
No files matched your search
@@ -3,6 +3,7 @@ package serverevents
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"npm/internal/logger"
|
||||
|
||||
"github.com/jc21/go-sse"
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package serverevents
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestGet(t *testing.T) {
|
||||
s := Get()
|
||||
assert.NotEqual(t, nil, s)
|
||||
}
|
||||
|
||||
// This is just for code coverage more than anything
|
||||
func TestEverything(t *testing.T) {
|
||||
Get()
|
||||
SendMessage("test", "test", map[string]string{"user_id": "10"})
|
||||
SendChange("hosts")
|
||||
Shutdown()
|
||||
}
|
||||
Reference in new issue
Block a user