Moved httpr_test.go to httpr package to get access to private funcs.

This commit is contained in:
Alexander Andreev 2023-09-05 06:02:56 +04:00
parent a23264b00f
commit c237f8c566
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -1,4 +1,4 @@
package httpr_test
package httpr
import (
"net/http"
@ -6,12 +6,10 @@ import (
"os"
"strings"
"testing"
"git.arav.su/Arav/httpr"
)
func Test(t *testing.T) {
r := httpr.New()
r := New()
err := r.Handler(http.MethodGet, "/", func(w http.ResponseWriter, r *http.Request) {})
if err != nil {
@ -53,7 +51,7 @@ func Test(t *testing.T) {
func TestPaths(t *testing.T) {
found := false
r := httpr.New()
r := New()
err := r.Handler(http.MethodGet, "/:lel", func(w http.ResponseWriter, r *http.Request) { found = true })
if err != nil {
@ -88,7 +86,7 @@ func TestPaths(t *testing.T) {
func TestSubPaths(t *testing.T) {
found := true
r := httpr.New()
r := New()
s := r.Sub("/api/v1")