chainfee: use proper mock for WebAPIFeeSource in tests
This commit is contained in:
2 files changed
+24
-14
No files matched your search
@@ -0,0 +1,17 @@
|
||||
package chainfee
|
||||
|
||||
import "github.com/stretchr/testify/mock"
|
||||
|
||||
type mockFeeSource struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// A compile-time assertion to ensure that mockFeeSource implements the
|
||||
// WebAPIFeeSource interface.
|
||||
var _ WebAPIFeeSource = (*mockFeeSource)(nil)
|
||||
|
||||
func (m *mockFeeSource) GetFeeMap() (map[uint32]uint32, error) {
|
||||
args := m.Called()
|
||||
|
||||
return args.Get(0).(map[uint32]uint32), args.Error(1)
|
||||
}
|
||||
Reference in new issue
Block a user