ducky/devices
3:8d40c0e5f4d9 Browse Files
Fix happy path test for getting devices. We forgot to create the Devices in the Storer tests, so our GetDevices happy path test was invalid. Add the call, and we're ok.
1.1 --- a/storer_test.go Thu Nov 12 22:19:38 2015 -0800 1.2 +++ b/storer_test.go Thu Nov 12 23:21:20 2015 -0800 1.3 @@ -47,6 +47,12 @@ 1.4 {ID: uuid.NewID(), Name: "Test 2", Owner: uuid.NewID(), Type: TypeAndroidTablet, Created: time.Now(), LastSeen: time.Now(), PushToken: "test token"}, 1.5 {ID: uuid.NewID(), Name: "Test 3", Owner: uuid.NewID(), Type: TypeChromeExtension, Created: time.Now(), LastSeen: time.Now(), PushToken: "test token"}, 1.6 } 1.7 + 1.8 + err = storer.CreateDevices(devices, context.TODO()) 1.9 + if err != nil { 1.10 + t.Errorf("Error creating devices in %T: %+v\n", err) 1.11 + } 1.12 + 1.13 ids := make([]uuid.ID, 0, len(devices)) 1.14 for _, device := range devices { 1.15 ids = append(ids, device.ID)