summaryrefslogtreecommitdiff
path: root/internal/showcase/rank_history_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/showcase/rank_history_test.go')
-rw-r--r--internal/showcase/rank_history_test.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/showcase/rank_history_test.go b/internal/showcase/rank_history_test.go
index f14d23a..6e010a7 100644
--- a/internal/showcase/rank_history_test.go
+++ b/internal/showcase/rank_history_test.go
@@ -16,7 +16,7 @@ func TestMovementArrow(t *testing.T) {
older int
want string
}{
- {name: "same spot", current: 3, older: 3, want: "→"},
+ {name: "same spot", current: 3, older: 3, want: "="},
{name: "improved", current: 2, older: 5, want: "↑"},
{name: "worse", current: 6, older: 4, want: "↓"},
{name: "missing older", current: 2, older: 0, want: "·"},
@@ -137,16 +137,19 @@ func TestFormatRankHistoryForHeader(t *testing.T) {
header := formatRankHistoryForHeader([]RepoRankHistory{
{Spot: 3, Anchor: "now"},
{Spot: 2, Anchor: "1w", Arrow: "↓"},
- {Spot: 2, Anchor: "2w", Arrow: "→"},
+ {Spot: 2, Anchor: "2w", Arrow: "="},
{Spot: 0, Anchor: "3w", Arrow: "·"},
})
- if !strings.Contains(header, "#3(now)") {
+ if !strings.Contains(header, "· #3") {
t.Fatalf("header missing current spot: %s", header)
}
- if !strings.Contains(header, "↓#2(1w)") {
+ if !strings.Contains(header, "↓#2") {
t.Fatalf("header missing down movement: %s", header)
}
+ if !strings.Contains(header, "=#2") {
+ t.Fatalf("header missing unchanged movement marker: %s", header)
+ }
if strings.Contains(header, "n/a") {
t.Fatalf("header should omit missing history points: %s", header)
}