add tests for previous orders feature