Fix tests that stubbed or mocked where(...).first.