| // Code generated by mockery v0.0.0-dev. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| allowed "go.skia.org/infra/go/allowed" |
| |
| http "net/http" |
| |
| mock "github.com/stretchr/testify/mock" |
| |
| testing "testing" |
| ) |
| |
| // Auth is an autogenerated mock type for the Auth type |
| type Auth struct { |
| mock.Mock |
| } |
| |
| // IsViewer provides a mock function with given fields: r |
| func (_m *Auth) IsViewer(r *http.Request) bool { |
| ret := _m.Called(r) |
| |
| var r0 bool |
| if rf, ok := ret.Get(0).(func(*http.Request) bool); ok { |
| r0 = rf(r) |
| } else { |
| r0 = ret.Get(0).(bool) |
| } |
| |
| return r0 |
| } |
| |
| // LoggedInAs provides a mock function with given fields: r |
| func (_m *Auth) LoggedInAs(r *http.Request) string { |
| ret := _m.Called(r) |
| |
| 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 |
| } |
| |
| // LoginURL provides a mock function with given fields: w, r |
| func (_m *Auth) LoginURL(w http.ResponseWriter, r *http.Request) string { |
| ret := _m.Called(w, r) |
| |
| var r0 string |
| if rf, ok := ret.Get(0).(func(http.ResponseWriter, *http.Request) string); ok { |
| r0 = rf(w, r) |
| } else { |
| r0 = ret.Get(0).(string) |
| } |
| |
| return r0 |
| } |
| |
| // SimpleInitWithAllow provides a mock function with given fields: port, local, admin, edit, view |
| func (_m *Auth) SimpleInitWithAllow(port string, local bool, admin allowed.Allow, edit allowed.Allow, view allowed.Allow) { |
| _m.Called(port, local, admin, edit, view) |
| } |
| |
| // NewAuth creates a new instance of Auth. It also registers a cleanup function to assert the mocks expectations. |
| func NewAuth(t testing.TB) *Auth { |
| mock := &Auth{} |
| |
| t.Cleanup(func() { mock.AssertExpectations(t) }) |
| |
| return mock |
| } |