diff --git a/tests/specs/neogit/config_spec.lua b/tests/specs/neogit/config_spec.lua new file mode 100644 index 000000000..1d4378a83 --- /dev/null +++ b/tests/specs/neogit/config_spec.lua @@ -0,0 +1,18 @@ +describe("neogit config", function() + describe("reversed status maps", function() + it("can be reversed by copy", function() + local config = require("neogit.config") + config.get_reversed_status_maps() + assert.True(config.values.mappings.status["s"] ~= nil) + assert.True(config.values.mappings.status["Stage"] == nil) + end) + + it("returns reversed status mappings", function () + local config = require("neogit.config") + local reversed_maps = config.get_reversed_status_maps() + assert.True(reversed_maps["Stage"] ~= nil) + assert.True(reversed_maps["Unstage"] ~= nil) + assert.True(reversed_maps["CommitPopup"] ~= nil) + end) + end) +end)