Add test coverage to course groups app

TNL-21

@jimabramson @andy-armstrong 
This is just a style thing, but I find these tests a little too short! Having complex logic in helper methods can obfuscate what the test is doing, at least to my way of reading things. I then have to verify that the test logic is correct in addition to the code being tested!

I think I'd prefer to see a single line setup call, followed by verification which can itself be a single line. Then you don't need the ```if```` clause in the helper method because each test only does one or the other case.