complement test spec for `redirect`
update main test spec & fix bug