robfig/revel — pull request #142 by erikstmartin (2013-05-10 03:21:19+00:00)
Title: Introduce the Session to test suites.

I've implemented Session into the TestSuite so that you can set values on t.Session as you would with c.Session in your controllers, then any calls to t.Get(), t.Post(), t.PostForm() and a new method called t.MakeRequestSession() which all pass the session cookie along with every request. All requests will restore t.Session from a cookie found in the response.

I apologize for the missing tests, I did start working on tests, but it appears that is going to be quite a bit more involved being the way this runs to through the testrunner, and it assumes an app is running because it hooks all kinds of values that are setup by the app an d plugins etc. I figured i'd send the pull request anyway in case it's a quick minor change that wants to be pulled in.

I definitely think we'll need to come up with a way of making TestSuite testable itself though, if the test coverage is to improve over time in the app.