mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Shored up test coverage.
This commit is contained in:
@@ -38,9 +38,13 @@ func TestSetupSchedule(t *testing.T) {
|
||||
assert.Contains(t, recorder.Body.String(), "2014-01-02 11:48:00") // Last match of second block.
|
||||
assert.Contains(t, recorder.Body.String(), "2014-01-03 16:54:00") // Last match of third block.
|
||||
|
||||
// Save schedule.
|
||||
// Save schedule and check that it is published to TBA.
|
||||
tbaBaseUrl = "fakeurl"
|
||||
eventSettings.TbaPublishingEnabled = true
|
||||
recorder = postHttpResponse("/setup/schedule/save", "")
|
||||
matches, err := db.GetMatchesByType("qualification")
|
||||
assert.Equal(t, 500, recorder.Code)
|
||||
assert.Contains(t, recorder.Body.String(), "Failed to publish matches")
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, 64, len(matches))
|
||||
assert.Equal(t, 1388595600, matches[0].Time.Unix())
|
||||
|
||||
Reference in New Issue
Block a user