Add a bit of sanity to the stream health messages
This commit is contained in:
@@ -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.")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user