Permalink
Browse files

Tests now largely functional, but some genuine failures.

41 tests, 281 assertions, 8 failures, 9 errors
TODO: BlueCloth errors; 'ORDER BY last_name' invalid for many models;
names formatted as "Last, First" instead of "First Last";
get_subtree / get_hierarchy problems; misc others.
  • Loading branch information...
1 parent e06c0ee commit 9ff8b840c6d7542c9a9c29b9b888014c5c11907c @thomasn committed Jul 11, 2009
@@ -36,6 +36,8 @@ def div_columns(i)
def order_by(class_name)
if class_name == 'Group'
'name'
+ elsif class_name == 'EmailMessage'
+ 'subject' # TODO or add created_at to model and use as sort field
else
'last_name'
end
@@ -1,19 +1,19 @@
-# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
-# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
-# License:: MIT License
-
+# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
+# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
+# License:: MIT License
+
require File.dirname(__FILE__) + '/../test_helper'
require 'account_controller'
# Re-raise errors caught by the controller.
class AccountController; def rescue_action(e) raise e end; end
-class AccountControllerTest < Test::Unit::TestCase
+class AccountControllerTest < ActionController::TestCase
# Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead
# Then, you can remove it from this and the units test.
include AuthenticatedTestHelper
- ## CLEANUP - all fixtures preloaded ## fixtures :users
+ fixtures :users
def setup
@controller = AccountController.new
@@ -8,8 +8,8 @@
# Re-raise errors caught by the controller.
class CommonController; def rescue_action(e) raise e end; end
-class CommonControllerTest < Test::Unit::TestCase
- # FIXME all fixtures preloaded # fixtures :dynamic_attributes, :dynamic_attribute_values, :groups, :group_types, :contacts, :contacts_groups, :activities, :activity_types, :activities_contacts
+class CommonControllerTest < ActionController::TestCase
+ fixtures :dynamic_attributes, :dynamic_attribute_values, :groups, :group_types, :contacts, :contacts_groups, :activities, :activity_types, :activities_contacts
def setup
@controller = CommonController.new
@@ -4,11 +4,11 @@
require File.dirname(__FILE__) + '/../test_helper'
-class ContactMailerTest < Test::Unit::TestCase
+class ContactMailerTest < ActiveSupport::TestCase
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
CHARSET = "utf-8"
- ## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :email_messages, :activities, :contacts, :activities_contacts, :activity_types
+ fixtures :dynamic_attributes, :dynamic_attribute_values, :email_messages, :activities, :contacts, :activities_contacts, :activity_types
include ActionMailer::Quoting
@@ -4,7 +4,7 @@
require File.dirname(__FILE__) + '/../test_helper'
-class DynamicAttributeTest < Test::Unit::TestCase
+class DynamicAttributeTest < ActiveSupport::TestCase
# FIXME all fixtures loaded by test_helper # fixtures :dynamic_attributes, :dynamic_attribute_values
@@ -4,8 +4,8 @@
require File.dirname(__FILE__) + '/../test_helper'
-class DynamicAttributeValueTest < Test::Unit::TestCase
- ## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values
+class DynamicAttributeValueTest < ActiveSupport::TestCase
+ fixtures :dynamic_attributes, :dynamic_attribute_values
# Replace this with your real tests.
def test_truth
@@ -10,7 +10,7 @@ class ApplicationHelperTest < ActionView::TestCase
### tests ApplicationHelper
### include ApplicationHelper
- ## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :groups
+ fixtures :dynamic_attributes, :dynamic_attribute_values, :contacts, :groups
def setup
super
@@ -1,14 +1,14 @@
-# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
-# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
-# License:: MIT License
-
+# Author:: Renat Akhmerov (mailto:renat@brainhouse.ru)
+# Author:: Yury Kotlyarov (mailto:yura@brainhouse.ru)
+# License:: MIT License
+
require File.dirname(__FILE__) + '/../test_helper'
-class UserTest < Test::Unit::TestCase
+class UserTest < ActiveSupport::TestCase
# Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead.
# Then, you can remove it from this and the functional test.
include AuthenticatedTestHelper
- ## CLEANUP - all fixtures preloaded ## fixtures :dynamic_attributes, :dynamic_attribute_values, :users
+ fixtures :dynamic_attributes, :dynamic_attribute_values, :users
def test_should_create_user
assert_difference User, :count do

0 comments on commit 9ff8b84

Please sign in to comment.