Atualizando para o Rails 2.3.2
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class AttachmentTest < Test::Unit::TestCase
|
||||
class AttachmentTest < ActiveSupport::TestCase
|
||||
fixtures :attachments
|
||||
|
||||
def setup
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class CourseTest < Test::Unit::TestCase
|
||||
class CourseTest < ActiveSupport::TestCase
|
||||
|
||||
fixtures :courses
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
require File.dirname(__FILE__) + '/../test_helper'
|
||||
|
||||
class UserTest < Test::Unit::TestCase
|
||||
class UserTest < ActiveSupport::TestCase
|
||||
|
||||
fixtures :users
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user