diff options
| author | Paul Buetow <paul@buetow.org> | 2024-09-12 10:33:11 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-09-12 10:33:11 +0300 |
| commit | 0b15a3b786bce10c112655fddbb4cc5b74e7a0d3 (patch) | |
| tree | 79a45861ad9faedb51b2a89994206aa57b7521ce /internal/server/repository/pending_test.go | |
| parent | 8d88383d769afbfb50e5dfdb559713e075481a43 (diff) | |
refactor a bit
Diffstat (limited to 'internal/server/repository/pending_test.go')
| -rw-r--r-- | internal/server/repository/pending_test.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/internal/server/repository/pending_test.go b/internal/server/repository/pending_test.go index 9f9ca84..f149856 100644 --- a/internal/server/repository/pending_test.go +++ b/internal/server/repository/pending_test.go @@ -1,11 +1,15 @@ package repository -import "testing" +import ( + "testing" + + "codeberg.org/snonux/gos/internal/types" +) func TestPendingAdd(t *testing.T) { pending := newPending() - entries, ok := pending.get("LinkedIn") + entries, ok := pending.get(types.LinkedIn) if ok { t.Error("expected no ok return status") } @@ -15,10 +19,10 @@ func TestPendingAdd(t *testing.T) { // TODO REFACTOR: Use constants for types.PlatformName's // TODO REFACTOR: Don't use a type alias for types.PlatformName anymore, but an own type. - pending.add("LinkedIn", "foo") - pending.add("LinkedIn", "bar") + pending.add(types.LinkedIn, "foo") + pending.add(types.LinkedIn, "bar") - entries, ok = pending.get("LinkedIn") + entries, ok = pending.get(types.LinkedIn) if !ok { t.Error("expected ok return status") } |
