diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-07-13 14:30:34 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-07-13 14:30:34 +0530 |
| commit | dc6aab4910c589e1e37e7cb93d65a1195fbbca1f (patch) | |
| tree | 406fc321c7c5f99a81b0d02e9362171d1a071776 /internal/metadata | |
| parent | 343933855797b9ebff6b759019718c8ddccb7b28 (diff) | |
| download | galleryd-dc6aab4910c589e1e37e7cb93d65a1195fbbca1f.tar.xz galleryd-dc6aab4910c589e1e37e7cb93d65a1195fbbca1f.zip | |
test: add shared fixture helpers
Diffstat (limited to 'internal/metadata')
| -rw-r--r-- | internal/metadata/reader_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/metadata/reader_test.go b/internal/metadata/reader_test.go index 0c9637b..772f078 100644 --- a/internal/metadata/reader_test.go +++ b/internal/metadata/reader_test.go @@ -2,11 +2,11 @@ package metadata import ( "context" - "path/filepath" "testing" "time" "github.com/RanXom/galleryd/internal/scanner" + "github.com/RanXom/galleryd/internal/testfixtures" ) func TestReader(t *testing.T) { @@ -14,7 +14,7 @@ func TestReader(t *testing.T) { t.Run("reads image dimensions", func(t *testing.T) { file := scanner.File{ - Path: filepath.Join("..", "testfixtures", "Canon_40D.jpg"), + Path: testfixtures.Canon40D(), } metadata, err := reader.Read(context.Background(), file) @@ -29,7 +29,7 @@ func TestReader(t *testing.T) { t.Run("reads EXIF timestamp", func(t *testing.T) { file := scanner.File{ - Path: filepath.Join("..", "testfixtures", "Canon_40D.jpg"), + Path: testfixtures.Canon40D(), } metadata, err := reader.Read(context.Background(), file) @@ -57,7 +57,7 @@ func TestReader(t *testing.T) { ) file := scanner.File{ - Path: filepath.Join("..", "testfixtures", "no-exif.png"), + Path: testfixtures.NoEXIF(), ModTime: modTime, } @@ -77,7 +77,7 @@ func TestReader(t *testing.T) { t.Run("returns default orientation", func(t *testing.T) { file := scanner.File{ - Path: filepath.Join("..", "testfixtures", "no-exif.png"), + Path: testfixtures.NoEXIF(), } metadata, err := reader.Read(context.Background(), file) |