##// END OF EJS Templates
Merged r5091 from trunk....
Merged r5091 from trunk. scm: mercurial: add :order => 'id DESC' explicitly for MySQL test fails. Because :order => 'id DESC' is defined at 'has_many', there is no need to set 'order'. But, MySQL test fails. Sqlite3 and PostgreSQL pass. Is this MySQL bug? MySQL svn trunk test on Redmine CI server fails. But, svn 1.1-stable passes. If this is MySQL bug, this effects 1.1-stable, too. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5092 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r4395:17f86d964fe0
r4972:891ed84fe39e
Show More
journal_test.rb
50 lines | 1.6 KiB | text/x-ruby | RubyLexer
Jean-Philippe Lang
Added issues status changes on the activity view (initial patch by Cyril Mougel)....
r879 # redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Jean-Baptiste Barth
Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050...
r4395 require File.expand_path('../../test_helper', __FILE__)
Jean-Philippe Lang
Added issues status changes on the activity view (initial patch by Cyril Mougel)....
r879
Eric Davis
Upgraded to Rails 2.3.4 (#3597)...
r2773 class JournalTest < ActiveSupport::TestCase
Jean-Philippe Lang
Added issues status changes on the activity view (initial patch by Cyril Mougel)....
r879 fixtures :issues, :issue_statuses, :journals, :journal_details
def setup
@journal = Journal.find 1
end
def test_journalized_is_an_issue
issue = @journal.issue
assert_kind_of Issue, issue
assert_equal 1, issue.id
end
def test_new_status
status = @journal.new_status
assert_not_nil status
assert_kind_of IssueStatus, status
assert_equal 2, status.id
end
Eric Davis
Added observers to watch model objects for mail delivery instead of calling Mailer....
r2548
def test_create_should_send_email_notification
ActionMailer::Base.deliveries.clear
issue = Issue.find(:first)
user = User.find(:first)
journal = issue.init_journal(user, issue)
assert journal.save
assert_equal 1, ActionMailer::Base.deliveries.size
end
Jean-Philippe Lang
Added issues status changes on the activity view (initial patch by Cyril Mougel)....
r879 end