assertTrue(model.containsAttribute("tabs"));
}
@Test
public void createCategory_valid(){
Model model = new ExtendedModelMap();
User user = new UserImpl();
String categoryText = "Social";
CategoryImpl category = new CategoryImpl();
category.setText(categoryText);
SessionStatus sessionStatus = createMock(SessionStatus.class);
expect(userService.getAuthenticatedUser()).andReturn(user).once();
expect(categoryService.create(categoryText, user)).andReturn(new CategoryImpl());
sessionStatus.setComplete();
expectLastCall();
replay(userService, categoryService,sessionStatus);
String view = controller.createCategory(category, validToken, validToken, model, sessionStatus);
assertEquals("ViewName match", "redirect:/app/admin/categories?action=create", view);
assertTrue("empty model", model.asMap().isEmpty());
verify(userService, categoryService, sessionStatus);
}