databag/net/server/main_test.go
2022-01-11 23:04:27 -08:00

22 lines
387 B
Go

package main
import (
"testing"
"net/http/httptest"
app "databag/internal"
store "databag/internal/store"
)
func TestClaim(t *testing.T) {
store.SetPath("file::memory:?cache=shared");
r := httptest.NewRequest("GET", "/claimable", nil)
w := httptest.NewRecorder()
app.GetNodeClaimable(w, r);
if w.Code != 200 {
t.Errorf("server not initially claimable");
}
}