aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/dbasik-api/return_test.go
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-04-20 16:42:06 +0100
committerMatthew Lemon <y@yulqen.org>2024-04-20 16:42:06 +0100
commited8a51dd320c5fb003f12003c7a66cfa353f6f81 (patch)
treed7a41ac466c53defaf7dd19364013432f366c666 /cmd/dbasik-api/return_test.go
parent04f78ef7a46ae4c4b8ab49153c16983c590783f5 (diff)
wip: testing the file package interface
Diffstat (limited to 'cmd/dbasik-api/return_test.go')
-rw-r--r--cmd/dbasik-api/return_test.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/cmd/dbasik-api/return_test.go b/cmd/dbasik-api/return_test.go
index c6a8664..bd2ffd9 100644
--- a/cmd/dbasik-api/return_test.go
+++ b/cmd/dbasik-api/return_test.go
@@ -2,6 +2,7 @@ package main
import (
"reflect"
+ "slices"
"testing"
"time"
)
@@ -166,3 +167,15 @@ func TestParseXLSX(t *testing.T) {
})
}
}
+
+func TestPrepareFiles(t *testing.T) {
+ fp := NewDirectoryFilePackage("../../testdata")
+ files, err := fp.Prepare()
+ if err != nil {
+ t.Error(err)
+ }
+ t.Log(files)
+ if !slices.Contains(files, "../../testdata/valid_excel.xlsx") {
+ t.Errorf("Prepare() did not return ../../testdata/valid_excel.xlsx")
+ }
+}