Skip to content

Commit

Permalink
Fix #69: luatable test structure (PR #88)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilzao authored Feb 3, 2023
1 parent e0503f5 commit f6cf04b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spec/acceptance_test_repeated_tags1_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ local handler = require("xmlhandler.tree")
local luaTable = {
tag = {
array = {
item = { _attr = { myattr = "something1" } },
item = { _attr = { myattr = "something2" } },
item = {
{ _attr = { myattr = "something1" } },
{ _attr = { myattr = "something2" } }
}
}
}
}
Expand Down Expand Up @@ -45,7 +47,7 @@ describe("Simple Repeated Tags with same structure Acceptance Tests ::", functio
print("\nParsed array XML:\n", parsedXml, "\n")

assert.is.truthy(string.find(parsedXml, '<item myattr="something1"'), "there should have an item with a 'something1' myattr value")
assert.is.truthy(string.find(parsedXml, '<item myattr="something1"'), "there should have an item with a 'something2' myattr value")
assert.is.truthy(string.find(parsedXml, '<item myattr="something2"'), "there should have an item with a 'something2' myattr value")
assert.is.falsy(string.find(parsedXml, "non-existent"))
end)
end)
Expand Down

0 comments on commit f6cf04b

Please sign in to comment.