| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| http "net/http" |
| |
| alogin "go.skia.org/infra/go/alogin" |
| |
| mock "github.com/stretchr/testify/mock" |
| |
| roles "go.skia.org/infra/go/roles" |
| ) |
| |
| // Login is an autogenerated mock type for the Login type |
| type Login struct { |
| mock.Mock |
| } |
| |
| // HasRole provides a mock function with given fields: r, role |
| func (_m *Login) HasRole(r *http.Request, role roles.Role) bool { |
| ret := _m.Called(r, role) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for HasRole") |
| } |
| |
| var r0 bool |
| if rf, ok := ret.Get(0).(func(*http.Request, roles.Role) bool); ok { |
| r0 = rf(r, role) |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| return r0 |
| } |
| |
| // LoggedInAs provides a mock function with given fields: r |
| func (_m *Login) LoggedInAs(r *http.Request) alogin.EMail { |
| ret := _m.Called(r) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for LoggedInAs") |
| } |
| |
| var r0 alogin.EMail |
| if rf, ok := ret.Get(0).(func(*http.Request) alogin.EMail); ok { |
| r0 = rf(r) |
| } else { |
| r0 = ret.Get(0).(alogin.EMail) |
| } |
| |
| return r0 |
| } |
| |
| // LoginURL provides a mock function with given fields: r |
| func (_m *Login) LoginURL(r *http.Request) string { |
| ret := _m.Called(r) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for LoginURL") |
| } |
| |
| var r0 string |
| if rf, ok := ret.Get(0).(func(*http.Request) string); ok { |
| r0 = rf(r) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| return r0 |
| } |
| |
| // Roles provides a mock function with given fields: r |
| func (_m *Login) Roles(r *http.Request) roles.Roles { |
| ret := _m.Called(r) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Roles") |
| } |
| |
| var r0 roles.Roles |
| if rf, ok := ret.Get(0).(func(*http.Request) roles.Roles); ok { |
| r0 = rf(r) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(roles.Roles) |
| } |
| } |
| |
| return r0 |
| } |
| |
| // Status provides a mock function with given fields: r |
| func (_m *Login) Status(r *http.Request) alogin.Status { |
| ret := _m.Called(r) |
| |
| if len(ret) == 0 { |
| panic("no return value specified for Status") |
| } |
| |
| var r0 alogin.Status |
| if rf, ok := ret.Get(0).(func(*http.Request) alogin.Status); ok { |
| r0 = rf(r) |
| } else { |
| r0 = ret.Get(0).(alogin.Status) |
| } |
| |
| return r0 |
| } |
| |
| // NewLogin creates a new instance of Login. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. |
| // The first argument is typically a *testing.T value. |
| func NewLogin(t interface { |
| mock.TestingT |
| Cleanup(func()) |
| }) *Login { |
| mock := &Login{} |
| mock.Mock.Test(t) |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |