added 'pending' to index view test in line 14 of code