aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/refinery/blog/admin/posts_controller_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/refinery/blog/admin/posts_controller_spec.rb b/spec/controllers/refinery/blog/admin/posts_controller_spec.rb
index b415c9d..03ae7ec 100644
--- a/spec/controllers/refinery/blog/admin/posts_controller_spec.rb
+++ b/spec/controllers/refinery/blog/admin/posts_controller_spec.rb
@@ -11,6 +11,7 @@ module Refinery
before do
blog_post.translations.create(:locale => :fr, :title => 'Un titre francais', :body => "La baguette, c'est bon. Mangez-en.")
+ blog_post.translations.create(:locale => :es, :title => 'Un titulo espanol', :body => "Mi casa e su casa.")
end
it "destroys the translation" do
@@ -18,6 +19,11 @@ module Refinery
blog_post.translations.exists?(:locale => :fr).should be_false
end
+ it "does not destroy other translations" do
+ post :delete_translation, :id => blog_post.id, :locale_to_delete => :fr
+ blog_post.translations.exists?(:locale => :es).should be_true
+ end
+
it "redirects on success" do
post :delete_translation, :id => blog_post.id, :locale_to_delete => :fr
response.should be_redirect