mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-11-10 22:08:07 +01:00
added additional check for empty ExternalAuth data in case the provider api changes
This commit is contained in:
1 parent
0ac4c9e1fc
commit
93b3788448
2 files changed
+13
No files matched your search
@@ -123,6 +123,12 @@ func TestSaveExternalAuth(t *testing.T) {
|
||||
app, _ := tests.NewTestApp()
|
||||
defer app.Cleanup()
|
||||
|
||||
// save with empty provider data
|
||||
emptyAuth := &models.ExternalAuth{}
|
||||
if err := app.Dao().SaveExternalAuth(emptyAuth); err == nil {
|
||||
t.Fatal("Expected error, got nil")
|
||||
}
|
||||
|
||||
auth := &models.ExternalAuth{
|
||||
UserId: "97cc3d3d-6ba2-383f-b42a-7bc84d27410c",
|
||||
Provider: "test",
|
||||
|
||||
Reference in new issue
Block a user