summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Lacasa <guillaumelacasa@hotmail.com>2015-06-29 15:36:38 +0200
committerGuillaume Lacasa <guillaumelacasa@hotmail.com>2015-06-29 15:36:38 +0200
commit3989c468e618330f5b5d1c67e5eaf2e0fa7c4c34 (patch)
treebb62881ff6d8ce3b34feb6f2bf6c57895b9e9546
parent5d4afd15454dcb6fca15622d55be5889029ecbfe (diff)
parentdc22815ee75be7f81bd1506d745601e08cc21d48 (diff)
downloadTwoStepsAuthenticator-3989c468e618330f5b5d1c67e5eaf2e0fa7c4c34.zip
TwoStepsAuthenticator-3989c468e618330f5b5d1c67e5eaf2e0fa7c4c34.tar.gz
TwoStepsAuthenticator-3989c468e618330f5b5d1c67e5eaf2e0fa7c4c34.tar.bz2
Merge pull request #5 from TouchStar/unittest_fixes
* Fixes for unit tests
-rw-r--r--TwoStepsAuthenticator.UnitTests/TimeAuthenticatorTests.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/TwoStepsAuthenticator.UnitTests/TimeAuthenticatorTests.cs b/TwoStepsAuthenticator.UnitTests/TimeAuthenticatorTests.cs
index 8aacfe1..0c385fa 100644
--- a/TwoStepsAuthenticator.UnitTests/TimeAuthenticatorTests.cs
+++ b/TwoStepsAuthenticator.UnitTests/TimeAuthenticatorTests.cs
@@ -50,8 +50,8 @@ namespace TwoStepsAuthenticator.UnitTests
var secret = Authenticator.GenerateKey();
var code = authenticator.GetCode(secret);
- Assert.IsTrue(authenticator.CheckCode(secret, code));
- Assert.IsFalse(authenticator.CheckCode(secret, code));
+ Assert.IsTrue(authenticator.CheckCode(secret, code, "dummyuser"));
+ Assert.IsFalse(authenticator.CheckCode(secret, code, "dummyuser"));
}
// Test Vectors from http://tools.ietf.org/html/rfc6238#appendix-B have all length 8. We want a length of 6.
@@ -79,7 +79,7 @@ namespace TwoStepsAuthenticator.UnitTests
Assert.True(authenticator.CheckCode("H22Q7WAMQYFZOJ2Q", "696227", null, out usedTime));
// 17:23:50 - 30s
- Assert.AreEqual(usedTime.Hour, 17);
+ Assert.AreEqual(usedTime.Hour, date.Hour);
Assert.AreEqual(usedTime.Minute, 23);
Assert.AreEqual(usedTime.Second, 20);
}