Skip to content

Commit

Permalink
fix(tests): add test for setLogo
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Nov 12, 2024
1 parent 467fb1c commit 3dd9903
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/ant_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe("Arweave Name Token", function()
_G.Description = "ANT's description"
_G.Keywords = { "KEYWORD-1", "KEYWORD-2", "KEYWORD-3" }
_G.Denomination = 1
_G.Logo = ""
end)

it("Initializes the state of the process", function()
Expand Down Expand Up @@ -167,4 +168,16 @@ describe("Arweave Name Token", function()
balances.setKeywords(notAnArray)
end, "Keywords must be an array")
end)

it("should set the logo", function()
local logo = string.rep("1", 43)
balances.setLogo(logo)
assert.are.same(logo, _G.Logo)
end)
it("should not set the logo with invalid id", function()
local logo = string.rep("1", 42)
assert.has_error(function()
balances.setLogo(logo)
end)
end)
end)

0 comments on commit 3dd9903

Please sign in to comment.