summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-14 14:26:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-14 14:26:27 +0000
commit205eda8b33d69defecedf2d246858a46d3d1d7c0 (patch)
tree4aeb58588ec0fa06ca385fe032168d336970fe55 /test/unit
parent010bfc56e15f442e4e597ddc9c436361c61b1e7a (diff)
downloadredmine-205eda8b33d69defecedf2d246858a46d3d1d7c0.tar.gz
redmine-205eda8b33d69defecedf2d246858a46d3d1d7c0.zip
Use AR callbacks instead of observers (removed in Rails4) for notifications.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12021 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/wiki_content_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/wiki_content_test.rb b/test/unit/wiki_content_test.rb
index 5956da963..e06b416f9 100644
--- a/test/unit/wiki_content_test.rb
+++ b/test/unit/wiki_content_test.rb
@@ -48,11 +48,12 @@ class WikiContentTest < ActiveSupport::TestCase
page = WikiPage.new(:wiki => @wiki, :title => "A new page")
page.content = WikiContent.new(:text => "Content text", :author => User.find(1), :comments => "My comment")
- with_settings :notified_events => %w(wiki_content_added) do
+ with_settings :default_language => 'en', :notified_events => %w(wiki_content_added) do
assert page.save
end
assert_equal 1, ActionMailer::Base.deliveries.size
+ assert_include 'wiki page has been added', mail_body(ActionMailer::Base.deliveries.last)
end
def test_update_should_be_versioned
@@ -99,6 +100,7 @@ class WikiContentTest < ActiveSupport::TestCase
end
assert_equal 1, ActionMailer::Base.deliveries.size
+ assert_include 'wiki page has been updated', mail_body(ActionMailer::Base.deliveries.last)
end
def test_fetch_history