Convert app/login_test.go t.Fatal calls into assert/require ca… (#12221)
Этот коммит содержится в:
коммит произвёл
Ben Schumacher
родитель
3802c1e4d3
Коммит
69eb2faf3d
@@ -6,6 +6,8 @@ package app
|
|||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCheckForClientSideCert(t *testing.T) {
|
func TestCheckForClientSideCert(t *testing.T) {
|
||||||
@@ -30,8 +32,6 @@ func TestCheckForClientSideCert(t *testing.T) {
|
|||||||
|
|
||||||
_, _, actualEmail := th.App.CheckForClientSideCert(r)
|
_, _, actualEmail := th.App.CheckForClientSideCert(r)
|
||||||
|
|
||||||
if actualEmail != tt.expectedEmail {
|
require.Equal(t, actualEmail, tt.expectedEmail, "CheckForClientSideCert(%v): expected %v, actual %v", tt.subject, tt.expectedEmail, actualEmail)
|
||||||
t.Fatalf("CheckForClientSideCert(%v): expected %v, actual %v", tt.subject, tt.expectedEmail, actualEmail)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user