Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
luk3yx committed Jul 25, 2024
1 parent 8f0d86a commit 0b25461
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1134,16 +1134,16 @@ describe("Flow", function()
end)
it("updates flow.get_context", function()
local form = flow.make_gui(function()
assert.equals(flow.get_context().value, "inner")
assert.equals("inner", flow.get_context().value)
return gui.Label{label = "Hello"}
end)
test_render(function(p, ctx)
ctx.value = "outer"
ctx.inner = {value = "inner"}
ctx.test = {value = "inner"}

assert.equals(flow.get_context().value, "outer")
assert.equals("outer", flow.get_context().value)
local embedded = form:embed{player = p, name = "test"}
assert.equals(flow.get_context().value, "outer")
assert.equals("outer", flow.get_context().value)
return embedded
end, gui.Label{label = "Hello"})
end)
Expand Down

0 comments on commit 0b25461

Please sign in to comment.