refac: missing mutation tests, spa specs, checks shown to pass, touch targets, catalogue entry, production code
This commit is contained in:
1 parent
7c15206170
commit
3e02e14da4
48 files changed
+2173
-83
No files matched your search
@@ -13,6 +13,7 @@ import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"RenewCMS/api/pkg/authtoken"
|
||||
@@ -20,6 +21,7 @@ import (
|
||||
)
|
||||
|
||||
type fakeBodyRenderer struct {
|
||||
mu sync.Mutex
|
||||
fail bool
|
||||
calls int
|
||||
}
|
||||
@@ -27,6 +29,8 @@ type fakeBodyRenderer struct {
|
||||
var _ domainArticle.BodyRenderer = &fakeBodyRenderer{}
|
||||
|
||||
func (f *fakeBodyRenderer) Render(html string, format domainArticle.BodyFormat) (string, error) {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
f.calls++
|
||||
if f.fail {
|
||||
return "", errors.New("render failed")
|
||||
|
||||
Reference in new issue
Block a user