Skip to content

Commit 1d6a655

Browse files
author
Johannes Weiß
committed
[hotfix] Fixed rest api interceptor tests after hotfix 4aa580f
1 parent 2187e47 commit 1d6a655

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

src/test/groovy/de/iteratec/osm/api/RestApiInterceptorSpec.groovy

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,16 @@ class RestApiInterceptorSpec extends Specification {
2525

2626
}
2727

28-
void "Test restApi interceptor - wrong controller, correct action won't match"() {
28+
void "Test restApi interceptor - wrong action won't match"() {
2929
when:"A request does not match the interceptor"
30-
withRequest(controller:"script", action: "securedViaApiKeySetNightlyDatabaseCleanupActivation")
30+
withRequest(action: "allBrowsers")
3131

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"
4733
!interceptorUnderTest.doesMatch()
4834
}
49-
void "Test restApi interceptor - correct controller, correct action will match"() {
35+
void "Test restApi interceptor - correct action will match"() {
5036
when:"A request matches the interceptor"
51-
withRequest(controller:"restApi", action: "securedViaApiKeySetNightlyDatabaseCleanupActivation")
37+
withRequest(action: "securedViaApiKeySetNightlyDatabaseCleanupActivation")
5238

5339
then:"The interceptor does match"
5440
interceptorUnderTest.doesMatch()

0 commit comments

Comments
 (0)