Add loginpage controller, login jsp and logincontroller unit test.

This commit is contained in:
dantanxiaotian
2019-05-01 14:55:38 -06:00
parent dd92307cf8
commit 7465568c97
7 changed files with 125 additions and 2 deletions
@@ -0,0 +1,24 @@
package edu.msudenver.tsp.website.controller;
import edu.msudenver.tsp.services.UserService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.ModelAndView;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
public class LogInControllerTest {
@Autowired UserService userService;
private final LogInController logInController = new LogInController(userService);
@Test
public void testEnterTheoremPage() {
ModelAndView modelAndView = logInController.enterLogInPage();
assertNotNull(modelAndView);
assertEquals("LogIn", modelAndView.getViewName());
}
}