Skip to content

Commit 2b075a8

Browse files
Add missing test case
Add test case for the user's email in the Coinbase provider. Sort the test cases and fix JSON formatting.
1 parent d0a313c commit 2b075a8

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/AspNet.Security.OAuth.Providers.Tests/Coinbase/CoinbaseTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ protected internal override void RegisterAuthentication(AuthenticationBuilder bu
2828
}
2929

3030
[Theory]
31-
[InlineData(ClaimTypes.NameIdentifier, "9da7a204-544e-5fd1-9a12-61176c5d4cd8")]
31+
[InlineData(ClaimTypes.Email, "[email protected]")]
3232
[InlineData(ClaimTypes.Name, "John Smith")]
33-
[InlineData("urn:coinbase:username", "jsmith")]
34-
[InlineData("urn:coinbase:profile_location", "test")]
33+
[InlineData(ClaimTypes.NameIdentifier, "9da7a204-544e-5fd1-9a12-61176c5d4cd8")]
34+
[InlineData("urn:coinbase:avatar_url", "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128")]
3535
[InlineData("urn:coinbase:profile_bio", "test")]
36+
[InlineData("urn:coinbase:profile_location", "test")]
3637
[InlineData("urn:coinbase:profile_url", "https://coinbase.com/jsmith")]
37-
[InlineData("urn:coinbase:avatar_url", "https://images.coinbase.com/avatar?h=vR%2FY8igBoPwuwGren5JMwvDNGpURAY%2F0nRIOgH%2FY2Qh%2BQ6nomR3qusA%2Bh6o2%0Af9rH&s=128")]
38+
[InlineData("urn:coinbase:username", "jsmith")]
3839
public async Task Can_Sign_In_Using_Coinbase(string claimType, string claimValue)
3940
{
4041
// Arrange

test/AspNet.Security.OAuth.Providers.Tests/Coinbase/bundle.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
"contentFormat": "json",
1919
"contentJson": {
2020
"id": "9da7a204-544e-5fd1-9a12-61176c5d4cd8",
21+
"email": "[email protected]",
2122
"name": "John Smith",
22-
"username": "jsmith",
23+
"username": "jsmith",
2324
"profile_location": "test",
2425
"profile_bio": "test",
2526
"profile_url": "https://coinbase.com/jsmith",

0 commit comments

Comments
 (0)