Skip to content

Commit

Permalink
Add tests [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Jul 27, 2024
1 parent 830c529 commit 8c20799
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -604,4 +604,26 @@ class ScriptDslTest extends Dsl2Spec {
result.val == 'Hello'
}


def 'should throw an exception on missing method' () {

when:
dsl_eval '''
Channel.doesNotExist()
'''
then:
def e1 = thrown(MissingMethodException)
e1.message == 'No signature of method: java.lang.Object.Channel.doesNotExist() is applicable for argument types: () values: []'

when:
dsl_eval '''
workflow {
Channel.doesNotExist()
}
'''
then:
def e2 = thrown(MissingProcessException)
e2.message == 'Missing process or function Channel.doesNotExist()'
}

}

0 comments on commit 8c20799

Please sign in to comment.