[view] [test] improved view middleware tests