Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mctalian committed Jan 1, 2025
1 parent 27757c7 commit 8396454
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
16 changes: 16 additions & 0 deletions spec/common_stubs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ function common_stubs.setup_G_RLF(spy)
mounts = true,
legendary = true,
},
prof = {
skillColor = { 1, 1, 1, 1 },
},
partyLoot = {
itemQualityFilter = {
[1] = true,
[2] = true,
[3] = true,
[4] = true,
[5] = true,
[6] = true,
},
},
xp = {
experienceTextColor = { 1, 1, 1, 1 },
},
},
},
L = {
Expand Down
19 changes: 10 additions & 9 deletions spec/utils/Enums_spec.lua
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
local common_stubs = require("spec.common_stubs")

describe("Enums", function()
local G_RLF
local ns

before_each(function()
G_RLF = {}
_G.G_RLF = G_RLF
assert(loadfile("utils/Enums.lua"))("TestAddon", G_RLF)
ns = common_stubs.setup_G_RLF(spy)
assert(loadfile("utils/Enums.lua"))("TestAddon", ns)
end)

it("defines DisableBossBanner enum", function()
assert.is_not_nil(G_RLF.DisableBossBanner)
assert.is_not_nil(ns.DisableBossBanner)
end)

it("defines LogEventSource enum", function()
assert.is_not_nil(G_RLF.LogEventSource)
assert.is_not_nil(ns.LogEventSource)
end)

it("defines LogLevel enum", function()
assert.is_not_nil(G_RLF.LogLevel)
assert.is_not_nil(ns.LogLevel)
end)

it("defines FeatureModule enum", function()
assert.is_not_nil(G_RLF.FeatureModule)
assert.is_not_nil(ns.FeatureModule)
end)

it("defines WrapCharEnum enum", function()
assert.is_not_nil(G_RLF.WrapCharEnum)
assert.is_not_nil(ns.WrapCharEnum)
end)
end)

0 comments on commit 8396454

Please sign in to comment.