This repository has been archived on 2022-05-25. You can view files and clone it, but cannot push or open issues or pull requests.
elon-eats-my-tweets/generated/mocks/SessionStore.go

88 lines
2.0 KiB
Go

// Code generated by mockery v2.12.2. DO NOT EDIT.
package mocks
import (
http "net/http"
sessions "github.com/gorilla/sessions"
mock "github.com/stretchr/testify/mock"
testing "testing"
)
// SessionStore is an autogenerated mock type for the Store type
type SessionStore struct {
mock.Mock
}
// Get provides a mock function with given fields: r, name
func (_m *SessionStore) Get(r *http.Request, name string) (*sessions.Session, error) {
ret := _m.Called(r, name)
var r0 *sessions.Session
if rf, ok := ret.Get(0).(func(*http.Request, string) *sessions.Session); ok {
r0 = rf(r, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sessions.Session)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*http.Request, string) error); ok {
r1 = rf(r, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// New provides a mock function with given fields: r, name
func (_m *SessionStore) New(r *http.Request, name string) (*sessions.Session, error) {
ret := _m.Called(r, name)
var r0 *sessions.Session
if rf, ok := ret.Get(0).(func(*http.Request, string) *sessions.Session); ok {
r0 = rf(r, name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*sessions.Session)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*http.Request, string) error); ok {
r1 = rf(r, name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Save provides a mock function with given fields: r, w, s
func (_m *SessionStore) Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error {
ret := _m.Called(r, w, s)
var r0 error
if rf, ok := ret.Get(0).(func(*http.Request, http.ResponseWriter, *sessions.Session) error); ok {
r0 = rf(r, w, s)
} else {
r0 = ret.Error(0)
}
return r0
}
// NewSessionStore creates a new instance of SessionStore. It also registers the testing.TB interface on the mock and a cleanup function to assert the mocks expectations.
func NewSessionStore(t testing.TB) *SessionStore {
mock := &SessionStore{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}