class ProjectDashBoardController {
/*
* This method is used to display project implementation's overview.
*/
def check() {
render "Hello"
}
는이 다음 작업을 렌더링하기 때문에 테스트가 실패 컨디셔닝 대신 그러한 오류 방법 없음 서명을 보여주는, 내 통합 테스트assertEquals controller.action() return null ....! COM :
package com.spock
import grails.plugin.spock.IntegrationSpec
class ProjectDashBoardControllerIntegrationSpec extends IntegrationSpec {
ProjectDashBoardController controller = new ProjectDashBoardController()
def cleanup() {
}
void "test check action"() {
when:
controller.check()
then:
controller.check()
assertEquals "/dashboard/index", controller.response.redirectedUrl
}
}를 따라
입니다. (java.lang.String, null) 값 : [/ dashboard/index, null]
Graeme의 답변을 수정하십시오. 또한 도움이된다면 대답을 받아 들여라. :) – dmahapatro