mirror of https://github.com/Squidex/squidex.git
2 changed files with 63 additions and 3 deletions
@ -0,0 +1,37 @@ |
|||
// ==========================================================================
|
|||
// GravatarHelperTests.cs
|
|||
// Squidex Headless CMS
|
|||
// ==========================================================================
|
|||
// Copyright (c) Squidex Group
|
|||
// All rights reserved.
|
|||
// ==========================================================================
|
|||
|
|||
using Xunit; |
|||
|
|||
namespace Squidex.Infrastructure |
|||
{ |
|||
public class GravatarHelperTests |
|||
{ |
|||
[Theory] |
|||
[InlineData("MyEmailAddress@example.com ")] |
|||
[InlineData("MyEmailAddress@example.com")] |
|||
[InlineData("myemailaddress@example.com")] |
|||
public void Should_generate_picture_url(string email) |
|||
{ |
|||
var url = GravatarHelper.CreatePictureUrl(email); |
|||
|
|||
Assert.Equal(url, "https://www.gravatar.com/avatar/0bc83cb571cd1c50ba6f3e8a78ef1346"); |
|||
} |
|||
|
|||
[Theory] |
|||
[InlineData("MyEmailAddress@example.com ")] |
|||
[InlineData("MyEmailAddress@example.com")] |
|||
[InlineData("myemailaddress@example.com")] |
|||
public void Should_generate_profile_url(string email) |
|||
{ |
|||
var url = GravatarHelper.CreateProfileUrl(email); |
|||
|
|||
Assert.Equal(url, "https://www.gravatar.com/0bc83cb571cd1c50ba6f3e8a78ef1346"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue