|
|
@@ -59,7 +59,7 @@ func Test_Model_View(t *testing.T) {
|
|
|
|
|
|
func Test_Model_View_init_state(t *testing.T) {
|
|
|
testModel := spawnTestModel(
|
|
|
- []string{"127.0.0.1", "cantresolvethisever"}, []float64{}, 0, 20, 10)
|
|
|
+ []string{"127.0.0.1", "cantresolvethisever"}, []float64{}, 40, 20, 10)
|
|
|
result := testModel.View().Content
|
|
|
assert.IsType(t, *new(string), result)
|
|
|
|
|
|
@@ -114,7 +114,7 @@ func Test_Model_View_has_big_chart(t *testing.T) {
|
|
|
lines := strings.Split(result, "\n")
|
|
|
assert.True(t, strings.Contains(lines[1], "127.0.0.1"), lines[1])
|
|
|
assert.False(t, strings.Contains(lines[1], "loading..."))
|
|
|
- assert.True(t, strings.Contains(lines[21], "0│"), result)
|
|
|
+ assert.True(t, strings.Contains(lines[20], "0│"), result)
|
|
|
}
|
|
|
|
|
|
func Test_Model_View_has_big_charts(t *testing.T) {
|
|
|
@@ -131,7 +131,7 @@ func Test_Model_View_has_big_charts(t *testing.T) {
|
|
|
for i, line := range lines {
|
|
|
if strings.Contains(line, "127.0.0.1") || strings.Contains(line, "cantresolvethisever") {
|
|
|
assert.False(t, strings.Contains(line, "loading..."))
|
|
|
- assert.True(t, strings.Contains(lines[i+20], "0│"), lines[i+20]) // assert bottom of chart is where we expect it to be
|
|
|
+ assert.True(t, strings.Contains(lines[i+19], "0│"), lines[i+19]) // assert bottom of chart is where we expect it to be
|
|
|
}
|
|
|
}
|
|
|
}
|