Skip to content

Commit

Permalink
better test
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Sarvarov committed Jun 12, 2024
1 parent 80f7ed6 commit 4a6e7df
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions inertia_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,15 @@ func TestInertia_Render(t *testing.T) {
w, r := requestMock(http.MethodGet, "/home")
asInertiaRequest(r)
withOnly(r, []string{"foo", "baz"})
withExcept(r, []string{"foo"})
withExcept(r, []string{"foo", "abc", "lazy", "always"})
withPartialComponent(r, "Some/Component")

err := I().Render(w, r, "Some/Component", Props{
"foo": "bar",
"baz": "quz",
"bez": "bee",
"foo": "bar",
"baz": "quz",
"bez": "bee",
"lazy": LazyProp(func() (any, error) { return "prop", nil }),
"always": AlwaysProp(func() any { return "prop" }),
})
if err != nil {
t.Fatalf("unexpected error: %#v", err)
Expand Down

0 comments on commit 4a6e7df

Please sign in to comment.