mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 18:16:26 +00:00
Add more unit tests
This commit is contained in:
@ -3,6 +3,7 @@ package serverevents
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"npm/internal/logger"
|
||||
|
||||
"github.com/jc21/go-sse"
|
||||
|
20
backend/internal/serverevents/sse_test.go
Normal file
20
backend/internal/serverevents/sse_test.go
Normal file
@ -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