Add a bit of sanity to the stream health messages

This commit is contained in:
Gabe Kangas
2022-04-07 00:14:23 -07:00
parent 422ae35e67
commit 2a6bebfb2a
2 changed files with 37 additions and 15 deletions

View File

@@ -30,3 +30,14 @@ func TestGetHashtagsFromText(t *testing.T) {
t.Error("Incorrect hashtags fetched from text.")
}
}
func TestPercentageUtilsTest(t *testing.T) {
total := 42
number := 18
percent := IntPercentage(number, total)
if percent != 42 {
t.Error("Incorrect percentage calculation.")
}
}