File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
src/test/groovy/com/twcable/grabbit/client/batch/steps/validation Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -79,17 +79,19 @@ class ValidJobDeciderSpec extends Specification {
7979 jobDecider. decide(jobExecution, stepExecution) == ValidJobDecider . JOB_INVALID
8080 }
8181
82- def " Will pass validation if paths with an existent parent are submitted" (){
82+ @Unroll
83+ def " Will pass validation if paths with an existent parent are submitted, path: #path for parent path #parentPath" (){
8384 when :
8485 final JobExecution jobExecution = Mock (JobExecution ) {
8586 getJobParameters() >> {
8687 return Mock (JobParameters ) {
87- getString(ClientBatchJob . PATH ) >> " /foo/bar "
88+ getString(ClientBatchJob . PATH ) >> path
8889 }
8990 }
9091 }
9192 final Session session = Mock (Session ) {
92- getNode(" /foo" ) >> { return Mock (Node ) }
93+ getNode(parentPath) >> { return Mock (Node ) }
94+ getNode(_) >> { throw new PathNotFoundException ()}
9395 }
9496
9597 ClientBatchJobContext . setSession(session)
@@ -99,6 +101,12 @@ class ValidJobDeciderSpec extends Specification {
99101
100102 then :
101103 jobDecider. decide(jobExecution, stepExecution) == ValidJobDecider . JOB_VALID
104+
105+ where :
106+ parentPath | path
107+ ' /foo' | ' /foo/bar'
108+ ' /foo' | ' /foo/fo'
109+ ' /foo' | ' /foo/fo/'
102110 }
103111
104112 def " Recovers gracefully if an issue is encountered with the repository" () {
You can’t perform that action at this time.
0 commit comments