refactor($q): removing duplicate tests by using describe loop