Single-page site with gallery by album and event, contact form over SMTP, Docker dev/prod setup, and on-server image derivatives. Gallery photos stay local (app/images/ is gitignored). Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
530 B
Go
23 lines
530 B
Go
package gallery
|
|
|
|
import "testing"
|
|
|
|
func TestCollectionFromRel(t *testing.T) {
|
|
rel := "templeoftechno/Anniversary-20251105T063538Z-1-001/Anniversary/photo.jpg"
|
|
key, label := collectionFromRel(rel)
|
|
if label != "Anniversary" {
|
|
t.Fatalf("label=%q", label)
|
|
}
|
|
if key != "anniversary" {
|
|
t.Fatalf("key=%q", key)
|
|
}
|
|
}
|
|
|
|
func TestURLPath_spaces(t *testing.T) {
|
|
got := URLPath("templeoftechno/The Groovatory/foo.jpg")
|
|
want := "templeoftechno/The%20Groovatory/foo.jpg"
|
|
if got != want {
|
|
t.Fatalf("got %q want %q", got, want)
|
|
}
|
|
}
|