Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: tweak
assertAuthorizationSuccess
to accept empty strings for…
… `avatar` Certain providers (eg. WorkOS, Azure) do not return an avatar URL in their user profile data. Hence, it is possible for `user.UserMetaData["avatar_url"]` to be `nil`. However, the `assertAuthorizationSuccess` function only accepts a `string` to compare against the stored avatar URL in a test, causing certain tests to fail when a This PR tweaks the test for avatar URL to check for `nil` if the supplied expected input is `""` (the empty string). Various tests are also modified for the Azure provider, which previously had workarounds including already creating a user before the signup occurred, which meant the initial login flow wasn't thoroughly tested. The alternative would be to change the type of `avatar` to `*string`, which is a lot more troublesome to write for in the common case of having an avatar URL, since you can't use the `&` referencing syntax for string constants.
- Loading branch information