lockbox

password manager
Log | Files | Refs | README | LICENSE

commit 16cd589fc8a322e78e4098fe6f1d9e78efac31ea
parent e1596e77be16d04625ec9f8971adfe2e886ca453
Author: Sean Enck <sean@ttypty.com>
Date:   Mon, 12 Aug 2024 18:34:48 -0400

test both functions of List() call

Diffstat:
Minternal/config/core_test.go | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/internal/config/core_test.go b/internal/config/core_test.go @@ -9,9 +9,14 @@ import ( "github.com/seanenck/lockbox/internal/config" ) -func TestPlatformSet(t *testing.T) { - if len(config.Platforms.List()) != 4 { - t.Error("invalid platform set") +func TestList(t *testing.T) { + for obj, cnt := range map[interface{ List() []string }]int{ + config.Platforms: 4, + config.JSONOutputs: 3, + } { + if len(obj.List()) != cnt { + t.Errorf("invalid list result: %v", obj) + } } }