Add error and flash messages tests.