Index: service/user/testing.go |
diff --git a/service/user/testing.go b/service/user/testing.go |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e9a972b588e77958c979137cfa9d11c996344422 |
--- /dev/null |
+++ b/service/user/testing.go |
@@ -0,0 +1,18 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package user |
+ |
+// Testing is the interface that test implimentations will provide. |
+type Testing interface { |
+ // SetUser sets the user to a pre-populated User object. |
+ SetUser(*User) |
+ |
+ // Login will generate and set a new User object with values derived from |
+ // email and admin values. It returns the generated clientID. |
+ Login(email string, admin bool) (clientID string) |
+ |
+ // Equivalent to SetUser(nil), but a bit more obvious to read in the code :). |
+ Logout() |
+} |