Commit 1d97315c624cbe2d72a3677bf1cd2bd8377e54ed
1 parent
cddbff5b
Exists in
master
and in
29 other branches
checkpoint
Showing
84 changed files
with
85 additions
and
85 deletions
Show diff stats
test/test_helper.rb
@@ -14,7 +14,7 @@ FileUtils.rm_rf(File.join(RAILS_ROOT, 'index', 'test')) | @@ -14,7 +14,7 @@ FileUtils.rm_rf(File.join(RAILS_ROOT, 'index', 'test')) | ||
14 | Image.attachment_options[:path_prefix] = 'test/tmp/public/images' | 14 | Image.attachment_options[:path_prefix] = 'test/tmp/public/images' |
15 | Thumbnail.attachment_options[:path_prefix] = 'test/tmp/public/thumbnails' | 15 | Thumbnail.attachment_options[:path_prefix] = 'test/tmp/public/thumbnails' |
16 | 16 | ||
17 | -class Test::Unit::TestCase | 17 | +class ActiveSupport::TestCase |
18 | # Transactional fixtures accelerate your tests by wrapping each test method | 18 | # Transactional fixtures accelerate your tests by wrapping each test method |
19 | # in a transaction that's rolled back on completion. This ensures that the | 19 | # in a transaction that's rolled back on completion. This ensures that the |
20 | # test database remains unchanged so your fixtures don't have to be reloaded | 20 | # test database remains unchanged so your fixtures don't have to be reloaded |
test/unit/acts_as_filesystem_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ActsAsFilesystemTest < Test::Unit::TestCase | 3 | +class ActsAsFilesystemTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | # FIXME shouldn't we test with a non-real model, instead of Article? | 5 | # FIXME shouldn't we test with a non-real model, instead of Article? |
6 | 6 |
test/unit/acts_as_having_boxes_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ActsAsHavingBoxesTest < Test::Unit::TestCase | 3 | +class ActsAsHavingBoxesTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'be able to find blocks by id' do | 5 | should 'be able to find blocks by id' do |
6 | env = fast_create(Environment, :name => 'An environment without blocks') | 6 | env = fast_create(Environment, :name => 'An environment without blocks') |
test/unit/acts_as_having_settings_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ActsAsHavingSettingsTest < Test::Unit::TestCase | 3 | +class ActsAsHavingSettingsTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | # using Block class as a sample user of the module | 5 | # using Block class as a sample user of the module |
6 | class TestClass < Block | 6 | class TestClass < Block |
test/unit/application_helper_test.rb
test/unit/article_block_test.rb
test/unit/article_categorization_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ArticleCategorizationTest < Test::Unit::TestCase | 3 | +class ArticleCategorizationTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'use articles_categories table' do | 5 | should 'use articles_categories table' do |
6 | assert_equal 'articles_categories', ArticleCategorization.table_name | 6 | assert_equal 'articles_categories', ArticleCategorization.table_name |
test/unit/article_test.rb
test/unit/assets_helper_test.rb
test/unit/block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class BlockTest < Test::Unit::TestCase | 3 | +class BlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'describe itself' do | 5 | should 'describe itself' do |
6 | assert_kind_of String, Block.description | 6 | assert_kind_of String, Block.description |
test/unit/blog_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class BlogHelperTest < Test::Unit::TestCase | 3 | +class BlogHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | include BlogHelper | 5 | include BlogHelper |
6 | include ContentViewerHelper | 6 | include ContentViewerHelper |
test/unit/boxes_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class BoxesHelperTest < Test::Unit::TestCase | 3 | +class BoxesHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | include BoxesHelper | 5 | include BoxesHelper |
6 | include ActionView::Helpers::TagHelper | 6 | include ActionView::Helpers::TagHelper |
test/unit/categories_helper_test.rb
test/unit/category_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | # FIXME move the filesystem-related tests out here | 3 | # FIXME move the filesystem-related tests out here |
4 | -class CategoryTest < Test::Unit::TestCase | 4 | +class CategoryTest < ActiveSupport::TestCase |
5 | 5 | ||
6 | def setup | 6 | def setup |
7 | @env = fast_create(Environment) | 7 | @env = fast_create(Environment) |
test/unit/change_password_test.rb
test/unit/cms_helper_test.rb
test/unit/comment_notifier_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CommentNotifierTest < Test::Unit::TestCase | 3 | +class CommentNotifierTest < ActiveSupport::TestCase |
4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' | 4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' |
5 | CHARSET = "utf-8" | 5 | CHARSET = "utf-8" |
6 | 6 |
test/unit/comment_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CommentTest < Test::Unit::TestCase | 3 | +class CommentTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'have a name and require it' do | 5 | should 'have a name and require it' do |
6 | assert_mandatory(Comment.new, :title) | 6 | assert_mandatory(Comment.new, :title) |
test/unit/communities_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CommunitiesBlockTest < Test::Unit::TestCase | 3 | +class CommunitiesBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'inherit from ProfileListBlock' do | 5 | should 'inherit from ProfileListBlock' do |
6 | assert_kind_of ProfileListBlock, CommunitiesBlock.new | 6 | assert_kind_of ProfileListBlock, CommunitiesBlock.new |
test/unit/community_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CommunityTest < Test::Unit::TestCase | 3 | +class CommunityTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @person = create_user('testuser').person | 6 | @person = create_user('testuser').person |
test/unit/consumption_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ConsumptionTest < Test::Unit::TestCase | 3 | +class ConsumptionTest < ActiveSupport::TestCase |
4 | fixtures :consumptions | 4 | fixtures :consumptions |
5 | 5 | ||
6 | should 'escape malformed html tags' do | 6 | should 'escape malformed html tags' do |
test/unit/contact_sender_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ContactSenderTest < Test::Unit::TestCase | 3 | +class ContactSenderTest < ActiveSupport::TestCase |
4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' | 4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' |
5 | CHARSET = "utf-8" | 5 | CHARSET = "utf-8" |
6 | 6 |
test/unit/content_viewer_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ContentViewerHelperTest < Test::Unit::TestCase | 3 | +class ContentViewerHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | include ActionView::Helpers::TagHelper | 5 | include ActionView::Helpers::TagHelper |
6 | include ContentViewerHelper | 6 | include ContentViewerHelper |
test/unit/countries_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CountriesHelperTest < Test::Unit::TestCase | 3 | +class CountriesHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @helper = CountriesHelper.instance | 6 | @helper = CountriesHelper.instance |
test/unit/create_community_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CreateCommunityTest < Test::Unit::TestCase | 3 | +class CreateCommunityTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @person = create_user('testing').person | 6 | @person = create_user('testing').person |
test/unit/create_enterprise_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class CreateEnterpriseTest < Test::Unit::TestCase | 3 | +class CreateEnterpriseTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'provide needed data' do | 5 | should 'provide needed data' do |
6 | task = CreateEnterprise.new | 6 | task = CreateEnterprise.new |
test/unit/dates_helper_test.rb
test/unit/disabled_enterprise_message_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class DisabledEnterpriseMessageBlockTest < Test::Unit::TestCase | 3 | +class DisabledEnterpriseMessageBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'provide description' do | 5 | should 'provide description' do |
6 | assert_not_equal Block.description, DisabledEnterpriseMessageBlock.description | 6 | assert_not_equal Block.description, DisabledEnterpriseMessageBlock.description |
test/unit/domain_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class DomainTest < Test::Unit::TestCase | 3 | +class DomainTest < ActiveSupport::TestCase |
4 | fixtures :domains, :environments, :profiles, :users | 4 | fixtures :domains, :environments, :profiles, :users |
5 | 5 | ||
6 | def setup | 6 | def setup |
test/unit/email_activation_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class EmailActivationTest < Test::Unit::TestCase | 3 | +class EmailActivationTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | ActionMailer::Base.delivery_method = :test | 6 | ActionMailer::Base.delivery_method = :test |
test/unit/enterprise_homepage_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class EnterpriseHomepageTest < Test::Unit::TestCase | 3 | +class EnterpriseHomepageTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @profile = create_user('testing').person | 6 | @profile = create_user('testing').person |
test/unit/enterprise_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class EnterpriseTest < Test::Unit::TestCase | 3 | +class EnterpriseTest < ActiveSupport::TestCase |
4 | fixtures :profiles, :environments, :users | 4 | fixtures :profiles, :environments, :users |
5 | 5 | ||
6 | def test_identifier_validation | 6 | def test_identifier_validation |
test/unit/enterprises_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class EnterprisesBlockTest < Test::Unit::TestCase | 3 | +class EnterprisesBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'inherit from ProfileListBlock' do | 5 | should 'inherit from ProfileListBlock' do |
6 | assert_kind_of ProfileListBlock, EnterprisesBlock.new | 6 | assert_kind_of ProfileListBlock, EnterprisesBlock.new |
test/unit/environment_statistics_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class EnvironmentStatisticsBlockTest < Test::Unit::TestCase | 3 | +class EnvironmentStatisticsBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'inherit from Block' do | 5 | should 'inherit from Block' do |
6 | assert_kind_of Block, EnvironmentStatisticsBlock.new | 6 | assert_kind_of Block, EnvironmentStatisticsBlock.new |
test/unit/environment_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class EnvironmentTest < Test::Unit::TestCase | 3 | +class EnvironmentTest < ActiveSupport::TestCase |
4 | fixtures :environments | 4 | fixtures :environments |
5 | 5 | ||
6 | def test_exists_default_and_it_is_unique | 6 | def test_exists_default_and_it_is_unique |
test/unit/events_helper_test.rb
test/unit/extended_tag_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | require 'extended_tag.rb' | 2 | require 'extended_tag.rb' |
3 | 3 | ||
4 | -class UserTest < Test::Unit::TestCase | 4 | +class UserTest < ActiveSupport::TestCase |
5 | 5 | ||
6 | def test_find_without_pendings | 6 | def test_find_without_pendings |
7 | tag1 = Tag.create(:name => 'pending_tag', :pending => true) | 7 | tag1 = Tag.create(:name => 'pending_tag', :pending => true) |
test/unit/feed_handler_test.rb
test/unit/feed_updater_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class FeedUpdaterTest < Test::Unit::TestCase | 3 | +class FeedUpdaterTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'be running by default' do | 5 | should 'be running by default' do |
6 | assert_equal true, FeedUpdater.new.running | 6 | assert_equal true, FeedUpdater.new.running |
test/unit/feed_writer_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class FeedWriterTest < Test::Unit::TestCase | 3 | +class FeedWriterTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'generate feeds' do | 5 | should 'generate feeds' do |
6 | articles = [] | 6 | articles = [] |
test/unit/folder_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class FolderHelperTest < Test::Unit::TestCase | 3 | +class FolderHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | include ActionView::Helpers::TagHelper | 5 | include ActionView::Helpers::TagHelper |
6 | include ActionView::Helpers::UrlHelper | 6 | include ActionView::Helpers::UrlHelper |
test/unit/forms_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class FormsHelperTest < Test::Unit::TestCase | 3 | +class FormsHelperTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | include FormsHelper | 5 | include FormsHelper |
6 | include ActionView::Helpers::TagHelper | 6 | include ActionView::Helpers::TagHelper |
test/unit/friendship_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class FriendshipTest < Test::Unit::TestCase | 3 | +class FriendshipTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'connect a person to another' do | 5 | should 'connect a person to another' do |
6 | p1 = create_user('person_test').person | 6 | p1 = create_user('person_test').person |
test/unit/google_maps_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class GoogleMapsTest < Test::Unit::TestCase | 3 | +class GoogleMapsTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @domain = fast_create(Domain, :name => 'example-domain', :google_maps_key => 'DOMAIN_KEY') | 6 | @domain = fast_create(Domain, :name => 'example-domain', :google_maps_key => 'DOMAIN_KEY') |
test/unit/image_gallery_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ImageGalleryTest < Test::Unit::TestCase | 3 | +class ImageGalleryTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'be a type of article' do | 5 | should 'be a type of article' do |
6 | assert_kind_of Article, ImageGallery.new | 6 | assert_kind_of Article, ImageGallery.new |
test/unit/image_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ImageTest < Test::Unit::TestCase | 3 | +class ImageTest < ActiveSupport::TestCase |
4 | fixtures :images | 4 | fixtures :images |
5 | 5 | ||
6 | should 'have thumbnails options' do | 6 | should 'have thumbnails options' do |
test/unit/integer_core_ext_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | # tests for Integer core extension. See lib/noosfero/core_ext/integer.rb | 3 | # tests for Integer core extension. See lib/noosfero/core_ext/integer.rb |
4 | -class IntegerCoreExtTest < Test::Unit::TestCase | 4 | +class IntegerCoreExtTest < ActiveSupport::TestCase |
5 | 5 | ||
6 | should 'display bytes in human readable' do | 6 | should 'display bytes in human readable' do |
7 | assert_equal '2 bytes', 2.bytes.to_humanreadable | 7 | assert_equal '2 bytes', 2.bytes.to_humanreadable |
test/unit/language_helper_test.rb
test/unit/lightbox_helper_test.rb
test/unit/location_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class LocationBlockTest < Test::Unit::TestCase | 3 | +class LocationBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @profile = create_user('lele').person | 6 | @profile = create_user('lele').person |
test/unit/login_block_test.rb
test/unit/main_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class MainBlockTest < Test::Unit::TestCase | 3 | +class MainBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'describe itself' do | 5 | should 'describe itself' do |
6 | assert_kind_of String, MainBlock.description | 6 | assert_kind_of String, MainBlock.description |
test/unit/members_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class MembersBlockTest < Test::Unit::TestCase | 3 | +class MembersBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'inherit from ProfileListBlock' do | 5 | should 'inherit from ProfileListBlock' do |
6 | assert_kind_of ProfileListBlock, MembersBlock.new | 6 | assert_kind_of ProfileListBlock, MembersBlock.new |
test/unit/noosfero_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | require 'noosfero' | 2 | require 'noosfero' |
3 | 3 | ||
4 | -class NoosferoTest < Test::Unit::TestCase | 4 | +class NoosferoTest < ActiveSupport::TestCase |
5 | 5 | ||
6 | def test_should_list_controllers_in_directory | 6 | def test_should_list_controllers_in_directory |
7 | Dir.expects(:glob).with("#{RAILS_ROOT}/app/controllers/lala/*_controller.rb").returns(["app/controllers/lala/system_admin_controller.rb", "app/controllers/lala/environment_admin_controller.rb", "app/controllers/lala/public_controller.rb", "app/controllers/lala/profile_admin_controller.rb"]).once | 7 | Dir.expects(:glob).with("#{RAILS_ROOT}/app/controllers/lala/*_controller.rb").returns(["app/controllers/lala/system_admin_controller.rb", "app/controllers/lala/environment_admin_controller.rb", "app/controllers/lala/public_controller.rb", "app/controllers/lala/profile_admin_controller.rb"]).once |
test/unit/organization_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class OrganizationTest < Test::Unit::TestCase | 3 | +class OrganizationTest < ActiveSupport::TestCase |
4 | fixtures :profiles | 4 | fixtures :profiles |
5 | 5 | ||
6 | def create_create_enterprise(org) | 6 | def create_create_enterprise(org) |
test/unit/pending_task_notifier_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class PendingTaskNotifierTest < Test::Unit::TestCase | 3 | +class PendingTaskNotifierTest < ActiveSupport::TestCase |
4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' | 4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' |
5 | CHARSET = "utf-8" | 5 | CHARSET = "utf-8" |
6 | 6 |
test/unit/person_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class PersonTest < Test::Unit::TestCase | 3 | +class PersonTest < ActiveSupport::TestCase |
4 | fixtures :profiles, :users, :environments | 4 | fixtures :profiles, :users, :environments |
5 | 5 | ||
6 | def test_person_must_come_form_the_cration_of_an_user | 6 | def test_person_must_come_form_the_cration_of_an_user |
test/unit/product_category_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ProductCategoryTest < Test::Unit::TestCase | 3 | +class ProductCategoryTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def test_all_products | 5 | def test_all_products |
6 | c0 = ProductCategory.create!(:name => 'base_cat', :environment => Environment.default) | 6 | c0 = ProductCategory.create!(:name => 'base_cat', :environment => Environment.default) |
test/unit/product_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ProductTest < Test::Unit::TestCase | 3 | +class ProductTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'create product' do | 5 | should 'create product' do |
6 | assert_difference Product, :count do | 6 | assert_difference Product, :count do |
test/unit/profile_helper_test.rb
test/unit/profile_image_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ProfileImageBlockTest < Test::Unit::TestCase | 3 | +class ProfileImageBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'provide description' do | 5 | should 'provide description' do |
6 | assert_not_equal Block.description, ProfileImageBlock.description | 6 | assert_not_equal Block.description, ProfileImageBlock.description |
test/unit/profile_info_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ProfileInfoBlockTest < Test::Unit::TestCase | 3 | +class ProfileInfoBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @profile = create_user('mytestuser').person | 6 | @profile = create_user('mytestuser').person |
test/unit/profile_list_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ProfileListBlockTest < Test::Unit::TestCase | 3 | +class ProfileListBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'describe itself' do | 5 | should 'describe itself' do |
6 | assert_not_equal Block.description, ProfileListBlock.description | 6 | assert_not_equal Block.description, ProfileListBlock.description |
test/unit/profile_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ProfileTest < Test::Unit::TestCase | 3 | +class ProfileTest < ActiveSupport::TestCase |
4 | fixtures :profiles, :environments, :users, :roles, :domains | 4 | fixtures :profiles, :environments, :users, :roles, :domains |
5 | 5 | ||
6 | def test_identifier_validation | 6 | def test_identifier_validation |
test/unit/recent_documents_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class RecentDocumentsBlockTest < Test::Unit::TestCase | 3 | +class RecentDocumentsBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @profile = create_user('testinguser').person | 6 | @profile = create_user('testinguser').person |
test/unit/region_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class RegionTest < Test::Unit::TestCase | 3 | +class RegionTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'be a subclass of category' do | 5 | should 'be a subclass of category' do |
6 | assert_equal Category, Region.superclass | 6 | assert_equal Category, Region.superclass |
test/unit/rss_feed_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class RssFeedTest < Test::Unit::TestCase | 3 | +class RssFeedTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'indicate the correct mime/type' do | 5 | should 'indicate the correct mime/type' do |
6 | assert_equal 'text/xml', RssFeed.new.mime_type | 6 | assert_equal 'text/xml', RssFeed.new.mime_type |
test/unit/search_helper_test.rb
test/unit/slug_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | # tests for String#to_slug core extension. See lib/noosfero/core_ext/string.rb | 3 | # tests for String#to_slug core extension. See lib/noosfero/core_ext/string.rb |
4 | -class SlugTest < Test::Unit::TestCase | 4 | +class SlugTest < ActiveSupport::TestCase |
5 | 5 | ||
6 | should 'keep only alphanum' do | 6 | should 'keep only alphanum' do |
7 | assert_equal 'abc', 'abc!)@(*#&@!*#*)'.to_slug | 7 | assert_equal 'abc', 'abc!)@(*#&@!*#*)'.to_slug |
test/unit/sqlite_extension_test.rb
@@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../test_helper' | @@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../test_helper' | ||
2 | 2 | ||
3 | # if this test is run without SQLite (e.g. with mysql or postgres), the tests | 3 | # if this test is run without SQLite (e.g. with mysql or postgres), the tests |
4 | # will just pass. The idea is to test our local extensions to SQLite. | 4 | # will just pass. The idea is to test our local extensions to SQLite. |
5 | -class SQliteExtensionTest < Test::Unit::TestCase | 5 | +class SQliteExtensionTest < ActiveSupport::TestCase |
6 | 6 | ||
7 | if ActiveRecord::Base.connection.adapter_name =~ /^sqlite$/i | 7 | if ActiveRecord::Base.connection.adapter_name =~ /^sqlite$/i |
8 | 8 |
test/unit/string_core_ext_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | # tests for String core extension. See lib/noosfero/core_ext/string.rb | 3 | # tests for String core extension. See lib/noosfero/core_ext/string.rb |
4 | -class StringCoreExtTest < Test::Unit::TestCase | 4 | +class StringCoreExtTest < ActiveSupport::TestCase |
5 | 5 | ||
6 | # tests for String#to_slug | 6 | # tests for String#to_slug |
7 | should 'keep only alphanum' do | 7 | should 'keep only alphanum' do |
test/unit/tags_block_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class TagsBlockTest < Test::Unit::TestCase | 3 | +class TagsBlockTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @user = create_user('testinguser').person | 6 | @user = create_user('testinguser').person |
test/unit/task_mailer_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class TaskMailerTest < Test::Unit::TestCase | 3 | +class TaskMailerTest < ActiveSupport::TestCase |
4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' | 4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' |
5 | CHARSET = "utf-8" | 5 | CHARSET = "utf-8" |
6 | 6 |
test/unit/task_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class TaskTest < Test::Unit::TestCase | 3 | +class TaskTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | ActionMailer::Base.delivery_method = :test | 6 | ActionMailer::Base.delivery_method = :test |
test/unit/text_article_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class TextArticleTest < Test::Unit::TestCase | 3 | +class TextArticleTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | # mostly dummy test. Can be removed when (if) there are real tests for this | 5 | # mostly dummy test. Can be removed when (if) there are real tests for this |
6 | # this class. | 6 | # this class. |
test/unit/textile_article_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class TextileArticleTest < Test::Unit::TestCase | 3 | +class TextileArticleTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @profile = create_user('testing').person | 6 | @profile = create_user('testing').person |
test/unit/thickbox_helper_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ThickboxHelperTest < Test::Unit::TestCase | 3 | +class ThickboxHelperTest < ActiveSupport::TestCase |
4 | include ThickboxHelper | 4 | include ThickboxHelper |
5 | 5 | ||
6 | def url_for(url) | 6 | def url_for(url) |
test/unit/thumbnail_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ThumbnailTest < Test::Unit::TestCase | 3 | +class ThumbnailTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'use sensible options' do | 5 | should 'use sensible options' do |
6 | assert_equal :file_system, Thumbnail.attachment_options[:storage] | 6 | assert_equal :file_system, Thumbnail.attachment_options[:storage] |
test/unit/tiny_mce_article_test.rb
test/unit/uploaded_file_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class UploadedFileTest < Test::Unit::TestCase | 3 | +class UploadedFileTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | def setup | 5 | def setup |
6 | @profile = create_user('testinguser').person | 6 | @profile = create_user('testinguser').person |
test/unit/user_mailer_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class UserMailerTest < Test::Unit::TestCase | 3 | +class UserMailerTest < ActiveSupport::TestCase |
4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' | 4 | FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' |
5 | CHARSET = "utf-8" | 5 | CHARSET = "utf-8" |
6 | 6 |
test/unit/user_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class UserTest < Test::Unit::TestCase | 3 | +class UserTest < ActiveSupport::TestCase |
4 | # Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead. | 4 | # Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead. |
5 | # Then, you can remove it from this and the functional test. | 5 | # Then, you can remove it from this and the functional test. |
6 | include AuthenticatedTestHelper | 6 | include AuthenticatedTestHelper |
test/unit/validation_info_test.rb
1 | require File.dirname(__FILE__) + '/../test_helper' | 1 | require File.dirname(__FILE__) + '/../test_helper' |
2 | 2 | ||
3 | -class ValidationInfoTest < Test::Unit::TestCase | 3 | +class ValidationInfoTest < ActiveSupport::TestCase |
4 | 4 | ||
5 | should 'validate the presence of validation methodology description' do | 5 | should 'validate the presence of validation methodology description' do |
6 | info = ValidationInfo.new | 6 | info = ValidationInfo.new |
vendor/plugins/xss_terminate/lib/xss_terminate.rb
@@ -80,7 +80,7 @@ module XssTerminate | @@ -80,7 +80,7 @@ module XssTerminate | ||
80 | end | 80 | end |
81 | 81 | ||
82 | def sanitize_fields_with_full | 82 | def sanitize_fields_with_full |
83 | - sanitizer = RailsSanitize.full_sanitizer | 83 | + sanitizer = ActionView::Base.full_sanitizer |
84 | columns, columns_serialized = sanitize_columns(:full) | 84 | columns, columns_serialized = sanitize_columns(:full) |
85 | columns.each do |column| | 85 | columns.each do |column| |
86 | sanitize_field(sanitizer, column.to_sym, columns_serialized.include?(column), :full) | 86 | sanitize_field(sanitizer, column.to_sym, columns_serialized.include?(column), :full) |
@@ -88,7 +88,7 @@ module XssTerminate | @@ -88,7 +88,7 @@ module XssTerminate | ||
88 | end | 88 | end |
89 | 89 | ||
90 | def sanitize_fields_with_white_list | 90 | def sanitize_fields_with_white_list |
91 | - sanitizer = RailsSanitize.white_list_sanitizer | 91 | + sanitizer = ActionView::Base.white_list_sanitizer |
92 | columns, columns_serialized = sanitize_columns(:white_list) | 92 | columns, columns_serialized = sanitize_columns(:white_list) |
93 | columns.each do |column| | 93 | columns.each do |column| |
94 | sanitize_field(sanitizer, column.to_sym, columns_serialized.include?(column), :white_list) | 94 | sanitize_field(sanitizer, column.to_sym, columns_serialized.include?(column), :white_list) |