Create User works
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using MileageTraker.Web.Utility;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Web.Tests.Membership
|
||||
{
|
||||
[TestFixture]
|
||||
public class CryptoTests
|
||||
{
|
||||
[Test]
|
||||
public void HashPassword_Test()
|
||||
{
|
||||
const string password = "1da";
|
||||
var hashPassword = Crypto.HashPassword(password);
|
||||
Assert.That(hashPassword, Is.Not.EqualTo(password));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void VerifyHashPassword_Test()
|
||||
{
|
||||
const string password = "1daFH2k1jv!3dsa";
|
||||
var hashPassword = Crypto.HashPassword(password);
|
||||
bool verifyHashedPassword = Crypto.VerifyHashedPassword(hashPassword, password);
|
||||
Assert.IsTrue(verifyHashedPassword);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user