3
我目前正在使用ScalaTest框架和ScalatraSuite類編寫一些Scalatra測試。從ScalatraTest-ScalaTest獲取會話價值
test("when i try to go to the base url it shold redirect me "){
get("/") {
status should be(302)
}
}
下一步需要我檢查一些會話值的存在,但不清楚如何做到這一點?任何人都可以建議嗎?爲了測試的目的,我創建了一個SessionAccess特性,它用一個可訪問的HashMap來重載商店會話的簡單特性,但我確定有一種更簡單的方法?
那就是我的想法。感謝您的確認。 – 2012-03-06 15:23:29