aboutsummaryrefslogtreecommitdiffstats
path: root/reader/reader_test.go
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-10-24 12:12:58 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2019-10-24 12:12:58 +0100
commite9aa53ccc3572bd17c22a3aa99851863cd2bde82 (patch)
treedcbbc86549a54c6d7aceaebc830bfeae6262461d /reader/reader_test.go
parentcdadb51e3e4ef5fb96da41496bafb11572ec487e (diff)
more testing
Diffstat (limited to 'reader/reader_test.go')
-rw-r--r--reader/reader_test.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/reader/reader_test.go b/reader/reader_test.go
index 44c2a56..ba3172e 100644
--- a/reader/reader_test.go
+++ b/reader/reader_test.go
@@ -7,7 +7,18 @@ import (
func TestReadDML(t *testing.T) {
d, _ := ReadDML("/home/lemon/Documents/datamaps/input/datamap.csv")
dmlData := *d
+ // Test Key values
if dmlData[0].Key != "Project/Programme Name" {
- t.Errorf("dmlData[0].key = %s; want Project/Programme Name", dmlData[0].Key)
+ t.Errorf("dmlData[0].Key = %s; want Project/Programme Name", dmlData[0].Key)
+ }
+ if dmlData[1].Key != "Department" {
+ t.Errorf("dmlData[1].Key = %s; want Department (without a space)", dmlData[1].Key)
+ }
+ if dmlData[2].Key != "Delivery Body" {
+ t.Errorf("dmlData[2].Key = %s; want Delivery Body (without a space)", dmlData[2].Key)
+ }
+ // Test Sheet values
+ if dmlData[0].Sheet != "Introduction" {
+ t.Errorf("dmlData[0].Sheet = %s; want Introduction", dmlData[0].Key)
}
}