fixed test with sort by date