added a test case for the redirect method