mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-20 01:57:09 +00:00
18 lines
382 B
Go
18 lines
382 B
Go
package raw
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestPreviewExtAllowed(t *testing.T) {
|
|
t.Run("Allowed", func(t *testing.T) {
|
|
assert.True(t, PreviewExtAllowed(".cr3"))
|
|
assert.True(t, PreviewExtAllowed(".dng"))
|
|
assert.True(t, PreviewExtAllowed(".nef"))
|
|
})
|
|
t.Run("Unsafe", func(t *testing.T) {
|
|
assert.False(t, PreviewExtAllowed(".mos"))
|
|
})
|
|
}
|