This commit is contained in:
Cadey Ratio 2019-11-01 17:44:49 -04:00
parent e52987b017
commit 7900a5b21c
2 changed files with 2 additions and 3 deletions

View File

@ -122,7 +122,7 @@ func (s *Site) showGallery(w http.ResponseWriter, r *http.Request) {
var tags string var tags string
if len(p.Tags) != 0 { if len(p.Tags) != 0 {
for _, t := range p.Tags{ for _, t := range p.Tags {
tags = tags + " #" + strings.ReplaceAll(t, "-", "") tags = tags + " #" + strings.ReplaceAll(t, "-", "")
} }
} }

View File

@ -40,14 +40,13 @@ func TestLoadGallery(t *testing.T) {
if art.ImageURL == "" { if art.ImageURL == "" {
t.Errorf("art %s (%s) doesn't have an image link", art.Title, art.DateString) t.Errorf("art %s (%s) doesn't have an image link", art.Title, art.DateString)
} }
if art.ThumbURL == "" { if art.ThumbURL == "" {
t.Errorf("art %s (%s) doesn't have a thumbnail link", art.Title, art.DateString) t.Errorf("art %s (%s) doesn't have a thumbnail link", art.Title, art.DateString)
} }
} }
} }
func (p Post) test(t *testing.T) { func (p Post) test(t *testing.T) {
if p.Title == "" { if p.Title == "" {
t.Error("no post title") t.Error("no post title")