Permalink
Browse files

add unit test for doctrine_clear_use_flush_option

  • Loading branch information...
1 parent 1f40d81 commit f9c08657ad672f9d6f9bc6cbcaa446342aa84960 ulrich committed Mar 11, 2013
Showing with 14 additions and 0 deletions.
  1. +14 −0 spec/capifony_symfony2_doctrine_spec.rb
View
14 spec/capifony_symfony2_doctrine_spec.rb 100644 → 100755
@@ -207,5 +207,19 @@
it { should have_run(' sh -c \'cd /var/www/releases/20120927 && php app/console doctrine:fixtures:load --env=prod --em=custom_em\'') }
it { should have_run(' sh -c \'cd /var/www/releases/20120927 && php app/console doctrine:migrations:status --env=prod --em=custom_em\'') }
end
+
+ context "when running symfony:doctrine:clear_* with flush option" do
+ before do
+ @configuration.set :doctrine_clear_use_flush_option, true
+
+ @configuration.find_and_execute_task('symfony:doctrine:cache:clear_metadata')
+ @configuration.find_and_execute_task('symfony:doctrine:cache:clear_query')
+ @configuration.find_and_execute_task('symfony:doctrine:cache:clear_result')
+ end
+
+ it { should have_run(' sh -c \'cd /var/www/releases/20120927 && php app/console doctrine:cache:clear-metadata --env=prod --flush\'') }
+ it { should have_run(' sh -c \'cd /var/www/releases/20120927 && php app/console doctrine:cache:clear-query --env=prod --flush\'') }
+ it { should have_run(' sh -c \'cd /var/www/releases/20120927 && php app/console doctrine:cache:clear-result --env=prod --flush\'') }
+ end
end

0 comments on commit f9c0865

Please sign in to comment.