================== Read tests ==================================
(t *testing.T)
| 258 | |
| 259 | // ================== Read tests ================================== |
| 260 | func TestUserGet(t *testing.T) { |
| 261 | // Test not found |
| 262 | got, err := adp.UserGet(dummyUid1) |
| 263 | if err == nil && got != nil { |
| 264 | t.Error("user should be nil.") |
| 265 | } |
| 266 | |
| 267 | got, err = adp.UserGet(types.ParseUserId("usr" + testData.Users[0].Id)) |
| 268 | if err != nil { |
| 269 | t.Fatal(err) |
| 270 | } |
| 271 | |
| 272 | // User agent is not stored when creating a user. Make sure it's the same. |
| 273 | got.UserAgent = testData.Users[0].UserAgent |
| 274 | |
| 275 | if !reflect.DeepEqual(got, testData.Users[0]) { |
| 276 | t.Error(mismatchErrorString("User", got, testData.Users[0])) |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | func TestUserGetAll(t *testing.T) { |
| 281 | // Test not found (dummy UIDs). |
nothing calls this directly
no test coverage detected
searching dependent graphs…