Save and report which teams have successfully connected to the field.

This commit is contained in:
Patrick Fairbank
2018-09-21 16:05:44 -07:00
parent da006e6359
commit 9ebea8a51c
10 changed files with 84 additions and 9 deletions

View File

@@ -96,9 +96,9 @@ func TestTeamsCsvReport(t *testing.T) {
recorder := web.getHttpResponse("/reports/csv/teams")
assert.Equal(t, 200, recorder.Code)
assert.Equal(t, "text/plain", recorder.HeaderMap["Content-Type"][0])
expectedBody := "Number,Name,Nickname,City,StateProv,Country,RookieYear,RobotName\n254,\"NASA\"," +
"\"The Cheesy Poofs\",\"San Jose\",\"CA\",\"USA\",1999,\"Barrage\"\n1114,\"GM\",\"Simbotics\"," +
"\"St. Catharines\",\"ON\",\"Canada\",2003,\"Simbot Evolution\"\n\n"
expectedBody := "Number,Name,Nickname,City,StateProv,Country,RookieYear,RobotName,HasConnected\n254,\"NASA\"," +
"\"The Cheesy Poofs\",\"San Jose\",\"CA\",\"USA\",1999,\"Barrage\",false\n1114,\"GM\",\"Simbotics\"," +
"\"St. Catharines\",\"ON\",\"Canada\",2003,\"Simbot Evolution\",false\n\n"
assert.Equal(t, expectedBody, recorder.Body.String())
}