-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moves tests around and removes tpep folder
- Loading branch information
1 parent
8f65e8e
commit edcc793
Showing
34 changed files
with
610 additions
and
4,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"_comment": "contains a list of frontend-driver interfaces branch names that this core supports", | ||
"versions": [ | ||
"1.17" | ||
"1.17", | ||
"2.0" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,29 +2,28 @@ package dashboard | |
|
||
import ( | ||
"encoding/json" | ||
"io" | ||
"net/http" | ||
"net/http/httptest" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/supertokens/supertokens-golang/recipe/dashboard/api" | ||
"github.com/supertokens/supertokens-golang/recipe/dashboard/api/userdetails" | ||
"github.com/supertokens/supertokens-golang/recipe/emailpassword" | ||
"github.com/supertokens/supertokens-golang/recipe/passwordless/plessmodels" | ||
"github.com/supertokens/supertokens-golang/recipe/session" | ||
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels" | ||
"github.com/supertokens/supertokens-golang/recipe/thirdpartypasswordless" | ||
"github.com/supertokens/supertokens-golang/recipe/thirdpartypasswordless/tplmodels" | ||
"io" | ||
"net/http" | ||
"net/http/httptest" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" | ||
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword" | ||
"github.com/supertokens/supertokens-golang/supertokens" | ||
"github.com/supertokens/supertokens-golang/test/unittesting" | ||
) | ||
|
||
/* | ||
- Initialise with thirdpartyemailpassword and provide no custom form fields | ||
- Create an emailpassword user using the thirdpartyemailpassword recipe | ||
- Get user from the user get API | ||
- Check that user has public tenant | ||
*/ | ||
|
@@ -42,7 +41,7 @@ func TestThatUserGetReturnsTenantIDsCorrectly(t *testing.T) { | |
WebsiteDomain: "supertokens.io", | ||
}, | ||
RecipeList: []supertokens.Recipe{ | ||
thirdpartyemailpassword.Init(nil), | ||
emailpassword.Init(nil), | ||
Init(&dashboardmodels.TypeInput{ | ||
ApiKey: "testapikey", | ||
}), | ||
|
@@ -61,7 +60,7 @@ func TestThatUserGetReturnsTenantIDsCorrectly(t *testing.T) { | |
testServer := httptest.NewServer(supertokens.Middleware(mux)) | ||
defer testServer.Close() | ||
|
||
signupResponse, err := thirdpartyemailpassword.EmailPasswordSignUp("public", "[email protected]", "abcd1234") | ||
signupResponse, err := emailpassword.SignUp("public", "[email protected]", "abcd1234") | ||
if err != nil { | ||
t.Error(err.Error()) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,12 @@ import ( | |
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" | ||
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword" | ||
"github.com/supertokens/supertokens-golang/recipe/emailpassword" | ||
"github.com/supertokens/supertokens-golang/supertokens" | ||
"github.com/supertokens/supertokens-golang/test/unittesting" | ||
) | ||
|
||
/* | ||
- Initialise with thirdpartyemailpassword and provide no custom form fields | ||
- Create an emailpassword user using the thirdpartyemailpassword recipe | ||
- Try to change the password of the user | ||
- Should result in no errors | ||
- Sign in with new password | ||
|
@@ -35,7 +33,7 @@ func TestThatUpdatingPasswordWithNoSignUpFeatureInTPEPWorks(t *testing.T) { | |
WebsiteDomain: "supertokens.io", | ||
}, | ||
RecipeList: []supertokens.Recipe{ | ||
thirdpartyemailpassword.Init(nil), | ||
emailpassword.Init(nil), | ||
Init(&dashboardmodels.TypeInput{ | ||
ApiKey: "testapikey", | ||
}), | ||
|
@@ -54,7 +52,7 @@ func TestThatUpdatingPasswordWithNoSignUpFeatureInTPEPWorks(t *testing.T) { | |
testServer := httptest.NewServer(supertokens.Middleware(mux)) | ||
defer testServer.Close() | ||
|
||
signupResponse, err := thirdpartyemailpassword.EmailPasswordSignUp("public", "[email protected]", "abcd1234") | ||
signupResponse, err := emailpassword.SignUp("public", "[email protected]", "abcd1234") | ||
if err != nil { | ||
t.Error(err.Error()) | ||
} | ||
|
@@ -78,7 +76,7 @@ func TestThatUpdatingPasswordWithNoSignUpFeatureInTPEPWorks(t *testing.T) { | |
|
||
assert.Equal(t, http.StatusOK, res.StatusCode) | ||
|
||
signInResponse, err := thirdpartyemailpassword.EmailPasswordSignIn("public", "[email protected]", "newabcd1234") | ||
signInResponse, err := emailpassword.SignIn("public", "[email protected]", "newabcd1234") | ||
if err != nil { | ||
t.Error(err.Error()) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,12 @@ import ( | |
|
||
"github.com/stretchr/testify/assert" | ||
"github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" | ||
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword" | ||
"github.com/supertokens/supertokens-golang/recipe/emailpassword" | ||
"github.com/supertokens/supertokens-golang/supertokens" | ||
"github.com/supertokens/supertokens-golang/test/unittesting" | ||
) | ||
|
||
/* | ||
- Initialise with thirdpartyemailpassword and provide no custom form fields | ||
- Create an emailpassword user using the thirdpartyemailpassword recipe | ||
- Try to change the password of the user | ||
- Should result in no errors | ||
- Sign in with new password | ||
|
@@ -35,7 +33,7 @@ func TestThatUpdatingEmailWithNoSignUpFeatureInTPEPWorks(t *testing.T) { | |
WebsiteDomain: "supertokens.io", | ||
}, | ||
RecipeList: []supertokens.Recipe{ | ||
thirdpartyemailpassword.Init(nil), | ||
emailpassword.Init(nil), | ||
Init(&dashboardmodels.TypeInput{ | ||
ApiKey: "testapikey", | ||
}), | ||
|
@@ -54,7 +52,7 @@ func TestThatUpdatingEmailWithNoSignUpFeatureInTPEPWorks(t *testing.T) { | |
testServer := httptest.NewServer(supertokens.Middleware(mux)) | ||
defer testServer.Close() | ||
|
||
signupResponse, err := thirdpartyemailpassword.EmailPasswordSignUp("public", "[email protected]", "abcd1234") | ||
signupResponse, err := emailpassword.SignUp("public", "[email protected]", "abcd1234") | ||
if err != nil { | ||
t.Error(err.Error()) | ||
} | ||
|
@@ -78,7 +76,7 @@ func TestThatUpdatingEmailWithNoSignUpFeatureInTPEPWorks(t *testing.T) { | |
|
||
assert.Equal(t, http.StatusOK, res.StatusCode) | ||
|
||
signInResponse, err := thirdpartyemailpassword.EmailPasswordSignIn("public", "[email protected]", "abcd1234") | ||
signInResponse, err := emailpassword.SignIn("public", "[email protected]", "abcd1234") | ||
|
||
if err != nil { | ||
t.Error(err.Error()) | ||
|
Oops, something went wrong.