Luiserebii/git-identity

Tests only test Identity class and I/O, but not git functionality

Opened this issue · 1 comments

The tests, at the moment, test for the following:

  • Expected results from class Identity functions
  • Addition/edit/update/removal of identities from/to file

However, things such as getting or setting identities aren't. As git is a tool that exists on a "global scope", tests are required to test on an isolated instance of git. I'm not 100% sure how this is accomplished, which is why this piece, unfortunately, must be tested manually, which is technically a bit of a risk to do on personal setups.

The following functions:
shiftIdentity()
shiftIdentityLocal()
getIdentityGlobal()
getIdentityLocal()
setIdentityGlobal()
setIdentityLocal()
are thus untested.

If anyone knows how to accomplish this, kindly post below, or make a PR 😃

Another note; one way this could be accomplished is probably by running those certain tests exclusively on Travis CI, writing them, but having them ignored on personal dev machines. The only disadvantage would be the inability to make this test without pushing.