Atualizando para o Rails 2.3.2

This commit is contained in:
2009-07-16 11:55:04 -03:00
parent dcfc38eb09
commit 8e9b698944
71 changed files with 220 additions and 173 deletions

View File

@@ -16,7 +16,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class AttachmentTest < Test::Unit::TestCase
class AttachmentTest < ActiveSupport::TestCase
fixtures :attachments
def setup

View File

@@ -16,7 +16,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class CourseTest < Test::Unit::TestCase
class CourseTest < ActiveSupport::TestCase
fixtures :courses

View File

@@ -16,7 +16,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class EventTest < Test::Unit::TestCase
class EventTest < ActiveSupport::TestCase
fixtures :events
# Replace this with your real tests.

View File

@@ -16,15 +16,21 @@
require File.dirname(__FILE__) + '/../test_helper'
class MessageTest < Test::Unit::TestCase
class MessageTest < ActiveSupport::TestCase
fixtures :messages
def test_should_create_new_version
news = News.find(1)
news.title = "another title"
assert news.save_version?
end
def test_should_not_create_new_version
news = News.find(1)
news.destroy
news = News.find_with_deleted(1)
news.restore!
assert !news.dirty?
news.recover!
assert !news.save_version?
end
end

View File

@@ -16,7 +16,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class NotificationsTest < Test::Unit::TestCase
class NotificationsTest < ActiveSupport::TestCase
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
CHARSET = "utf-8"

View File

@@ -16,7 +16,7 @@
require File.dirname(__FILE__) + '/../test_helper'
class UserTest < Test::Unit::TestCase
class UserTest < ActiveSupport::TestCase
fixtures :users

View File

@@ -16,10 +16,10 @@
require File.dirname(__FILE__) + '/../test_helper'
class WikiPageTest < Test::Unit::TestCase
class WikiPageTest < ActiveSupport::TestCase
def test_should_create_new_version_when_editing
wp = WikiPage.create(:content => 'test', :title => 'test', :version => 1, :course_id => 1, :user_id => 1, :description => 'teste')
wp = WikiPage.new
assert !wp.save_version?
wp.content = 'new content'
@@ -27,7 +27,7 @@ class WikiPageTest < Test::Unit::TestCase
end
def test_should_not_create_new_version_when_reordering
wp = WikiPage.create(:content => 'test', :title => 'test', :version => 1, :course_id => 1, :user_id => 1, :description => 'teste')
wp = WikiPage.new
assert !wp.save_version?
wp.move_higher