Fixed unit tests for studygroup/user specs

We could move this check to a method inside `Validation.rb` so it will be easier to read and can be reused.