Permalink
Browse files

moved cleanup calls to setUp() since the first test doesn't always ru…

…n first
  • Loading branch information...
1 parent e0feca9 commit f5655d0db68e6db406fcd56a22fc1fd4e37160ce Burt Beckwith committed May 25, 2012
Showing with 12 additions and 8 deletions.
  1. +12 −8 test/functional/com/demo/CacheTagFunctionalTests.groovy
@@ -4,6 +4,18 @@ import functionaltestplugin.FunctionalTestCase
class CacheTagFunctionalTests extends FunctionalTestCase {
+ protected void setUp() {
+ super.setUp()
+
+ get '/demo/clearBlocksCache'
+ assertStatus 200
+ assertContentContains 'cleared blocks cache'
+
+ get '/demo/clearTemplatesCache'
+ assertStatus 200
+ assertContentContains 'cleared templates cache'
+ }
+
void testBlockTag() {
get '/demo/blockCache?counter=5'
assertStatus 200
@@ -19,10 +31,6 @@ class CacheTagFunctionalTests extends FunctionalTestCase {
}
void testClearingBlocksCache() {
- get '/demo/clearBlocksCache'
- assertStatus 200
- assertContentContains 'cleared blocks cache'
-
get '/demo/blockCache?counter=100'
assertStatus 200
assertContentContains 'First block counter 101'
@@ -53,10 +61,6 @@ class CacheTagFunctionalTests extends FunctionalTestCase {
}
void testRenderTag() {
- get '/demo/clearTemplatesCache'
- assertStatus 200
- assertContentContains 'cleared templates cache'
-
get '/demo/renderTag?counter=1'
assertStatus 200

0 comments on commit f5655d0

Please sign in to comment.