tests: Fix broken logic in views tests