Compare commits

...

4 Commits

Author SHA1 Message Date
servusdei2018 7bbbb408ae tidy: quick fix cache_test (#699) 1 week ago
I am Fastidious 13dcd90503 Formatting 1 week ago
I am Fastidious dfc1b4e7a9 Break words with hyphens 1 week ago
I am Fastidious 5d0b4b992f Fix code block 1 week ago
  1. 17
      internal/cache_test.go
  2. 8
      internal/theme/static/css/98-pico-override.css

17
internal/cache_test.go

@ -6,7 +6,6 @@ import (
"net"
"net/http"
"net/http/httptest"
"strings"
"testing"
"time"
@ -456,10 +455,8 @@ func TestCache_Snipe(t *testing.T) {
cache.SnipeFeed(badtwt.Twter().URL, badtwt)
for key, feed := range cache.Views {
if strings.HasSuffix(key, discoverViewKey) {
feed.Snipe(badtwt)
}
for _, feed := range cache.Views {
feed.Snipe(badtwt)
}
assert.Equal(t, 2, cache.TwtCount())
@ -469,19 +466,21 @@ func TestCache_Snipe(t *testing.T) {
//
// Check cache.Feeds
for _, cached := range cache.Feeds {
for key, cached := range cache.Feeds {
for _, twt := range cached.GetTwts() {
if twt.Hash() == badtwt.Hash() {
assert.Error(t, nil, "twt deleted but found in Cache.Feeds")
err := fmt.Errorf("error, deleted twt found in Cache.Feeds[%s]", key)
assert.Error(t, err, "twt deleted but found in Cache.Feeds")
}
}
}
// Check cache.Views
for _, cached := range cache.Views {
for key, cached := range cache.Views {
for _, twt := range cached.GetTwts() {
if twt.Hash() == badtwt.Hash() {
assert.Error(t, nil, "twt deleted but found in Cache.Views")
err := fmt.Errorf("error, deleted twt found in Cache.Views[%s]", key)
assert.Error(t, err, "twt deleted but found in Cache.Views")
}
}
}

8
internal/theme/static/css/98-pico-override.css

@ -17,6 +17,10 @@ a {
-moz-border-radius: 0.3rem !important;
}
article .p-summary {
word-break: break-word;
}
dialog article {
margin: 0 0 0 -2rem !important;
padding: 1rem !important;
@ -26,6 +30,10 @@ pre>code {
padding: 0.25rem 0.5rem !important;
}
pre {
margin-bottom: 1.5rem;
}
code,
kbd {
padding: 0.2rem 0.3rem !important;

Loading…
Cancel
Save