[#4999] added Notion OAuth2 provider

Co-authored-by: s-li1 <stevenli8892@hotmail.com.au>
This commit is contained in:
Gani Georgiev
2024-10-10 14:46:22 +03:00
parent 64bbd6f841
commit 397b69041e
34 changed files with 178 additions and 37 deletions

View File

@@ -7,7 +7,7 @@ import (
)
func TestProvidersCount(t *testing.T) {
expected := 25
expected := 26
if total := len(auth.Providers); total != expected {
t.Fatalf("Expected %d providers, got %d", expected, total)
@@ -251,4 +251,13 @@ func TestNewProviderByName(t *testing.T) {
if _, ok := p.(*auth.Planningcenter); !ok {
t.Error("Expected to be instance of *auth.Planningcenter")
}
// notion
p, err = auth.NewProviderByName(auth.NameNotion)
if err != nil {
t.Errorf("Expected nil, got error %v", err)
}
if _, ok := p.(*auth.Notion); !ok {
t.Error("Expected to be instance of *auth.Notion")
}
}