@@ -22,6 +22,15 @@ class CacheSpec extends GebSpec {
22
22
response. text == ' deleted all LogEntry instances'
23
23
}
24
24
25
+ def cleanup () {
26
+ RestBuilder restBuilder = new RestBuilder ()
27
+ RestResponse response = restBuilder. get(" ${ baseUrl} /test/clearCache?cacheName=message" )
28
+ response. text == " cleared cache 'message'"
29
+
30
+ response = restBuilder. get(" ${ baseUrl} /test/clearLogEntries" )
31
+ response. text == ' deleted all LogEntry instances'
32
+ }
33
+
25
34
void testCacheAndEvict () {
26
35
given :
27
36
RestBuilder restBuilder = new RestBuilder ()
@@ -209,7 +218,7 @@ class CacheSpec extends GebSpec {
209
218
response. text == ' Result: null'
210
219
211
220
when :
212
- response = restBuilder. get(" ${ baseUrl} /cachingService/cachePut?key=band&value=Thin+ Lizzy" )
221
+ response = restBuilder. get(" ${ baseUrl} /cachingService/cachePut?key=band&value=Thin Lizzy" )
213
222
then :
214
223
response. status == 200
215
224
response. text == ' Result: ** Thin Lizzy **'
@@ -218,7 +227,7 @@ class CacheSpec extends GebSpec {
218
227
response = restBuilder. get(" ${ baseUrl} /cachingService/cacheGet?key=band" )
219
228
then :
220
229
response. status == 200
221
- response. text == ' Result: ** Thin Lizzy'
230
+ response. text == ' Result: ** Thin Lizzy ** '
222
231
223
232
when :
224
233
response = restBuilder. get(" ${ baseUrl} /cachingService/cacheGet?key=singer" )
@@ -227,7 +236,7 @@ class CacheSpec extends GebSpec {
227
236
response. text == ' Result: null'
228
237
229
238
when :
230
- response = restBuilder. get(" ${ baseUrl} /cachingService/cachePut?key=singer&value=Phil+ Lynott" )
239
+ response = restBuilder. get(" ${ baseUrl} /cachingService/cachePut?key=singer&value=Phil Lynott" )
231
240
then :
232
241
response. status == 200
233
242
response. text == ' Result: ** Phil Lynott **'
@@ -236,10 +245,10 @@ class CacheSpec extends GebSpec {
236
245
response = restBuilder. get(" ${ baseUrl} /cachingService/cacheGet?key=singer" )
237
246
then :
238
247
response. status == 200
239
- response. text == ' Result: ** Phil Lynott'
248
+ response. text == ' Result: ** Phil Lynott ** '
240
249
241
250
when :
242
- response = restBuilder. get(" ${ baseUrl} /cachingService/cachePut?key=singer&value=John+ Sykes" )
251
+ response = restBuilder. get(" ${ baseUrl} /cachingService/cachePut?key=singer&value=John Sykes" )
243
252
then :
244
253
response. status == 200
245
254
response. text == ' Result: ** John Sykes **'
@@ -248,13 +257,13 @@ class CacheSpec extends GebSpec {
248
257
response = restBuilder. get(" ${ baseUrl} /cachingService/cacheGet?key=singer" )
249
258
then :
250
259
response. status == 200
251
- response. text == ' Result: ** John Sykes'
260
+ response. text == ' Result: ** John Sykes ** '
252
261
253
262
when :
254
263
response = restBuilder. get(" ${ baseUrl} /cachingService/cacheGet?key=band" )
255
264
then :
256
265
response. status == 200
257
- response. text == ' Result: ** Thin Lizzy'
266
+ response. text == ' Result: ** Thin Lizzy ** '
258
267
}
259
268
260
269
void testBlockTag () {
0 commit comments