chore: Remove GetSourceByName
- Introduced in 5455605342
and removed in
the same commit. Usage was purely testing code.
This commit is contained in:
parent
1b10046e1a
commit
5423e22aeb
3 changed files with 2 additions and 18 deletions
|
@ -298,9 +298,7 @@ func addAuthSource(t *testing.T, payload map[string]string) *auth.Source {
|
|||
payload["_csrf"] = GetCSRF(t, session, "/admin/auths/new")
|
||||
req := NewRequestWithValues(t, "POST", "/admin/auths/new", payload)
|
||||
session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
source, err := auth.GetSourceByName(context.Background(), payload["name"])
|
||||
require.NoError(t, err)
|
||||
return source
|
||||
return unittest.AssertExistsAndLoadBean(t, &auth.Source{Name: payload["name"]})
|
||||
}
|
||||
|
||||
func authSourcePayloadOAuth2(name string) map[string]string {
|
||||
|
@ -358,9 +356,7 @@ func createRemoteAuthSource(t *testing.T, name, url, matchingSource string) *aut
|
|||
MatchingSource: matchingSource,
|
||||
},
|
||||
}))
|
||||
source, err := auth.GetSourceByName(context.Background(), name)
|
||||
require.NoError(t, err)
|
||||
return source
|
||||
return unittest.AssertExistsAndLoadBean(t, &auth.Source{Name: name})
|
||||
}
|
||||
|
||||
func createUser(ctx context.Context, t testing.TB, user *user_model.User) func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue