| Index: service/user/testable.go
|
| diff --git a/service/user/testable.go b/service/user/testable.go
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..749b60ed473c079b66092ad88aa0481bfe616e96
|
| --- /dev/null
|
| +++ b/service/user/testable.go
|
| @@ -0,0 +1,20 @@
|
| +// 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
|
| +
|
| +// Testable is the interface that test implimentations will provide.
|
| +type Testable 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 clientID, and admin values. If clientID is provided, the User will
|
| + // look like they logged in with OAuth. If it's empty, then this will look
|
| + // like they logged in via the cookie auth method.
|
| + Login(email, clientID string, admin bool)
|
| +
|
| + // Equivalent to SetUser(nil), but a bit more obvious to read in the code :).
|
| + Logout()
|
| +}
|
|
|