assertContains( res.getOutput(), "errorMessage" );
}
public void testErrorReturnedWhenActionRequiresLoginAndUserIsNotLoggedIn() throws Exception {
ApiAction action = createNiceMock( ApiAction.class );
expect( action.canHandle((Request)anyObject()) ).andReturn( Boolean.TRUE );
expect( action.requiresLogin() ).andReturn( Boolean.TRUE );
replay( action );
//
api.setUser( null );
boolean gotException = false;