diff --git a/internal/pkg/localFileStructure/ScanLocalFileStructure_test.go b/internal/pkg/localFileStructure/ScanLocalFileStructure_test.go new file mode 100644 index 0000000..5e4b5a7 --- /dev/null +++ b/internal/pkg/localFileStructure/ScanLocalFileStructure_test.go @@ -0,0 +1,22 @@ +package localFileStructure + +import "testing" + +func Test_ScanLocalFileStructure_should_find_testfile(t *testing.T) { + + images, err := ScanLocalFileStructure("../../../test/") + if err != nil { + t.Fatal(err) + } + + if len(images) != 1 { + t.Error("Did not find expected testfiles. Expected at least one!") + } + + for _, img := range images { + if img.Name != "testimage.jpg" { + t.Errorf("Did not find the expected testimage.") + } + } + +} diff --git a/test/testimage.jpg b/test/testimage.jpg new file mode 100755 index 0000000..4aebb11 Binary files /dev/null and b/test/testimage.jpg differ