Skip to content

Commit

Permalink
fix(tests): added unit tests for invalid type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlangzi committed Dec 25, 2024
1 parent e77de63 commit 60b8952
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routing_option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net/http"
"net/http/httptest"
"testing"
"time"

"github.com/stretchr/testify/require"
)
Expand Down Expand Up @@ -48,7 +49,7 @@ func TestRoutingOption(t *testing.T) {
}

return c.View(data)
}, WithMetadata("i1", ""),
},
WithNavigation("admin", "ha-dash", "admin:view"))

app.Get("/invalid", func(c *Context) error {
Expand All @@ -62,7 +63,7 @@ func TestRoutingOption(t *testing.T) {
}

return c.View(data)
}, WithMetadata("s1", 1), WithMetadata("i1", ""))
}, WithMetadata("s1", time.Now()), WithMetadata("i1", "v100"))

app.Start()
defer app.Close()
Expand Down

0 comments on commit 60b8952

Please sign in to comment.