Added assertExceptionRedirect

assertExceptionRedirect can be used to assert that an exception was thrown by the API that can be redirected.
Fixed error and added tests for scope errors