Improved testing

This commit is contained in:
Eduard Urbach 2017-10-02 00:01:01 +02:00
parent b45af0eaf9
commit 1101dafc90
4 changed files with 8 additions and 4 deletions

View File

@ -14,7 +14,7 @@ func BenchmarkDBAnimeListGetMap(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
animeList, _ := arn.GetAnimeList(user)
animeList, _ := arn.GetAnimeList(user.ID)
noop(animeList)
}
})

View File

@ -24,6 +24,8 @@ func TestRoutes(t *testing.T) {
if status := responseRecorder.Code; status != http.StatusOK {
t.Errorf("%s | Wrong status code | %v instead of %v", example, status, http.StatusOK)
} else {
t.Logf("%s | Correct status code | %v == %v", example, status, http.StatusOK)
}
}
}

View File

@ -23,7 +23,7 @@ js:
install:
$(GOINSTALL)
test:
$(GOTEST)
$(GOTEST) github.com/animenotifier/... -v
bench:
$(GOTEST) -bench .
tools:

View File

@ -210,8 +210,10 @@ component Anime(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*
RawIcon("eye")
//- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
//- RawIcon("google")
td.episode-airing-date-start.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
if episode.AiringDate.IsValid()
td.episode-airing-date-start.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
else
td.episode-airing-date-start
//- h3.anime-section-name Reviews
//- p Coming soon.