wstrange / GoogleAuth

Google Authenticator Server side code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unit Tests Without Assertions?

jamiejackson opened this issue · comments

I'm confused about the unit tests without assertions. I took a quick stab at writing some assertions, but since all of the (new) assertions fail, something's wrong with the code or (very likely) my assumptions.

jamiejackson@fb34c7b

Hi @jamiejackson,

Yes, you're right: those assertions fail. The only "proper" unit test is rfc6238TestVectors, a method that tests the TOTP generator against the test vectors specified in RFC 6238. The other methods are legacy and utility methods that are there for (my) convenience. Some of them could be cleaned up and refactored into proper unit tests, while others should probably be dropped altogether.