hmpatel / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

Request object returns null for sessionId in service layer of app #383

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create springboot app,with rest controller and integration test for controller
2.Create service for app with @Autowired HttpServletRequest object
3.Add method in service that calls request.getSession(true).getId());

What is the expected output? What do you see instead?
NullPointerExpection on test at request.getSession(true).getId());

Should create session on the mocked request.

What version of the product are you using? On what operating system?
2.4.0 MacOsx

Tried to  add sessionId to restassured with given().sessionId("1234"), but 
doesn't propagate to service layer. 
Also tried adding cookie with name and id same result.

Original issue reported on code.google.com by jtc198...@gmail.com on 3 Feb 2015 at 5:20

GoogleCodeExporter commented 9 years ago
Sorry forgot link to stackoverflow.
http://stackoverflow.com/questions/28283417/restassured-integration-controller-t
est-session-is-null

Original comment by jtc198...@gmail.com on 3 Feb 2015 at 5:25