Updated data models and associated code and tests for 2017.

This commit is contained in:
Patrick Fairbank
2017-07-12 20:20:52 -07:00
parent f37d70fe8b
commit 4d5d0b72bf
38 changed files with 429 additions and 967 deletions

View File

@@ -34,8 +34,7 @@ func TestSetupSettings(t *testing.T) {
// Change the settings and check the response.
recorder = postHttpResponse("/setup/settings", "name=Chezy Champs&code=CC&displayBackgroundColor=#ff00ff&"+
"numElimAlliances=16&tbaPublishingEnabled=on&tbaEventCode=2014cc&tbaSecretId=secretId&tbaSecret=tbasec&"+
"initialTowerStrength=9001")
"numElimAlliances=16&tbaPublishingEnabled=on&tbaEventCode=2014cc&tbaSecretId=secretId&tbaSecret=tbasec")
assert.Equal(t, 302, recorder.Code)
recorder = getHttpResponse("/setup/settings")
assert.Contains(t, recorder.Body.String(), "Chezy Champs")
@@ -46,7 +45,6 @@ func TestSetupSettings(t *testing.T) {
assert.Contains(t, recorder.Body.String(), "2014cc")
assert.Contains(t, recorder.Body.String(), "secretId")
assert.Contains(t, recorder.Body.String(), "tbasec")
assert.Contains(t, recorder.Body.String(), "9001")
}
func TestSetupSettingsInvalidValues(t *testing.T) {