added tests to the invite controller spec for 100% coverage