Ejemplo n.º 1
0
  @Test
  public void shouldNotIncludePluginMenusWhenThereIsNoProject() throws Exception {
    givenThereIsNoProject();

    Menu menu = givenAMenu();
    menus.includeMenus(menu, parameters);

    assertThat(menu.toString(), not(containsString("/projects")));
    mockery.assertIsSatisfied();
  }
Ejemplo n.º 2
0
  @Test
  public void whenThereIsAnIterationCreatePluginMenus() throws Exception {
    givenThereIsAProjectWithId(5l);
    givenThereIsAnIterationWithId(9l);
    givenAnythingElseIsIgnored();

    Menu menu = givenAMenu();

    menus.includeMenus(menu, parameters);

    assertThat(menu.toString(), containsString("/projects/5/iterations/9"));
    mockery.assertIsSatisfied();
  }