@@ -25,30 +25,16 @@ class RestApiInterceptorSpec extends Specification {
25
25
26
26
}
27
27
28
- void " Test restApi interceptor - wrong controller, correct action won't match" () {
28
+ void " Test restApi interceptor - wrong action won't match" () {
29
29
when :" A request does not match the interceptor"
30
- withRequest(controller : " script " , action : " securedViaApiKeySetNightlyDatabaseCleanupActivation " )
30
+ withRequest(action : " allBrowsers " )
31
31
32
- then :" The interceptor does match"
33
- ! interceptorUnderTest. doesMatch()
34
- }
35
- void " Test restApi interceptor - correct controller, wrong action won't match" () {
36
- when :" A request does not match the interceptor"
37
- withRequest(controller :" restApi" , action : " allBrowsers" )
38
-
39
- then :" The interceptor does match"
40
- ! interceptorUnderTest. doesMatch()
41
- }
42
- void " Test restApi interceptor - wrong controller, wrong action won't match" () {
43
- when :" A request does not match the interceptor"
44
- withRequest(controller :" script" , action : " list" )
45
-
46
- then :" The interceptor does match"
32
+ then :" The interceptor does not match"
47
33
! interceptorUnderTest. doesMatch()
48
34
}
49
- void " Test restApi interceptor - correct controller, correct action will match" () {
35
+ void " Test restApi interceptor - correct action will match" () {
50
36
when :" A request matches the interceptor"
51
- withRequest(controller : " restApi " , action : " securedViaApiKeySetNightlyDatabaseCleanupActivation" )
37
+ withRequest(action : " securedViaApiKeySetNightlyDatabaseCleanupActivation" )
52
38
53
39
then :" The interceptor does match"
54
40
interceptorUnderTest. doesMatch()
0 commit comments