Commit 3e2646a
Changed files (1)
serverHandlers_test.go
@@ -1,29 +1,6 @@
package main
-import (
- "log"
- "testing"
-)
-
-// tests the handlers for the server
-
-// TestBuildRecordArray ensures that the records arrays
-// returned follow the correct blueprinting options
-// passed
-func TestBuildRecordArray(t *testing.T) {
- numQ := 5
- recordCat := 3
- t.Run("Setting up test env...", TestBuildTree)
- categories[3].RecordArray = []Record{Record{Answer: "answer", Question: "question", Category: recordCat}}
- recordArray := buildRecordArray(numQ, []int{2, recordCat, 5})
- if len(recordArray) != numQ {
- t.Errorf("Record array wrong length: %d should be %d\n%s", len(recordArray), numQ, recordArray)
- t.FailNow()
- }
- if len(categories[categories[recordCat].Parent].Children) != 1 {
- log.Printf("Wrong children: %s", categories[categories[recordCat].Parent].Children)
- }
- if len(categories[recordCat].RecordArray) != 1 && len(categories[recordCat].UsedRecordArray) != 1 {
- log.Printf("Record not added: %+v", categories[recordCat])
- }
-}
+// import (
+// "log"
+// "testing"
+// )