Example usage for org.springframework.web.servlet.view RedirectView isRedirectView

List of usage examples for org.springframework.web.servlet.view RedirectView isRedirectView

Introduction

In this page you can find the example usage for org.springframework.web.servlet.view RedirectView isRedirectView.

Prototype

@Override
public boolean isRedirectView() 

Source Link

Document

Returns "true" indicating this view performs a redirect.

Usage

From source file:eu.jasha.demo.sbtfragments.CityControllerTest.java

@Test
public void should_delete_city() throws Exception {
    RedirectView view = controller.deleteCity(CITY_ID);

    assertThat(view.isRedirectView()).isTrue();
    assertThat(view.getUrl()).isEqualTo("/cities");

    verify(cityDao).remove(CITY_ID);/*from  w  w w  . j  av  a  2s  . c o  m*/
}

From source file:eu.jasha.demo.sbtfragments.CityControllerTest.java

@Test
public void should_update_city() throws Exception {
    RedirectView view = controller.updateCity(CITY_ID, city);

    assertThat(view.isRedirectView()).isTrue();
    assertThat(view.getUrl()).isEqualTo("");

    verify(cityDao).update(city);/*from w w  w  .j a v  a2s . c  o  m*/
}