Commit 46dafe22a99fe4665f4121a391870bec3c61f4db
1 parent
83726d73
Exists in
master
and in
29 other branches
Changing superclass for functional tests
Showing
38 changed files
with
38 additions
and
38 deletions
Show diff stats
test/functional/account_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'account_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class AccountController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class AccountControllerTest < Test::Unit::TestCase | |
7 | +class AccountControllerTest < ActionController::TestCase | |
8 | 8 | # Be sure to include AuthenticatedTestHelper in test/test_helper.rb instead |
9 | 9 | # Then, you can remove it from this and the units test. |
10 | 10 | include AuthenticatedTestHelper | ... | ... |
test/functional/admin_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'admin_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class AdminController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class AdminControllerTest < Test::Unit::TestCase | |
7 | +class AdminControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | should 'inherit from ApplicationController' do |
10 | 10 | assert_kind_of ApplicationController, AdminController.new | ... | ... |
test/functional/admin_panel_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'admin_panel_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class AdminPanelController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class AdminPanelControllerTest < Test::Unit::TestCase | |
7 | +class AdminPanelControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | def setup | ... | ... |
test/functional/application_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'test_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class TestController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ApplicationControllerTest < Test::Unit::TestCase | |
7 | +class ApplicationControllerTest < ActionController::TestCase | |
8 | 8 | all_fixtures |
9 | 9 | def setup |
10 | 10 | @controller = TestController.new | ... | ... |
test/functional/browse_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'browse_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class BrowseController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class BrowseControllerTest < Test::Unit::TestCase | |
7 | +class BrowseControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | def setup |
10 | 10 | @controller = BrowseController.new | ... | ... |
test/functional/catalog_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'catalog_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class CatalogController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class CatalogControllerTest < Test::Unit::TestCase | |
7 | +class CatalogControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = CatalogController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/categories_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'categories_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class CategoriesController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class CategoriesControllerTest < Test::Unit::TestCase | |
7 | +class CategoriesControllerTest < ActionController::TestCase | |
8 | 8 | all_fixtures |
9 | 9 | def setup |
10 | 10 | @controller = CategoriesController.new | ... | ... |
test/functional/cms_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'cms_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class CmsController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class CmsControllerTest < Test::Unit::TestCase | |
7 | +class CmsControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | fixtures :environments |
10 | 10 | ... | ... |
test/functional/contact_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'contact_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ContactController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ContactControllerTest < Test::Unit::TestCase | |
7 | +class ContactControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | ... | ... |
test/functional/content_viewer_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'content_viewer_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ContentViewerController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ContentViewerControllerTest < Test::Unit::TestCase | |
7 | +class ContentViewerControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | ... | ... |
test/functional/edit_template_controller_test.rb
... | ... | @@ -6,7 +6,7 @@ require 'edit_template_controller' |
6 | 6 | # Re-raise errors caught by the controller. |
7 | 7 | class EditTemplateController; def rescue_action(e) raise e end; end |
8 | 8 | |
9 | -class EditTemplateControllerTest < Test::Unit::TestCase | |
9 | +class EditTemplateControllerTest < ActionController::TestCase | |
10 | 10 | all_fixtures |
11 | 11 | def setup |
12 | 12 | @controller = EditTemplateController.new | ... | ... |
test/functional/enterprise_registration_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'enterprise_registration_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class EnterpriseRegistrationController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class EnterpriseRegistrationControllerTest < Test::Unit::TestCase | |
7 | +class EnterpriseRegistrationControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | # all_fixtures:users |
10 | 10 | all_fixtures | ... | ... |
test/functional/enterprise_validation_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'enterprise_validation_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class EnterpriseValidationController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class EnterpriseValidationControllerTest < Test::Unit::TestCase | |
7 | +class EnterpriseValidationControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | ... | ... |
test/functional/environment_design_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'environment_design_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class EnvironmentDesignController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class EnvironmentDesignControllerTest < Test::Unit::TestCase | |
7 | +class EnvironmentDesignControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | ALL_BLOCKS = [ArticleBlock, LoginBlock, EnvironmentStatisticsBlock, RecentDocumentsBlock, EnterprisesBlock, CommunitiesBlock, PeopleBlock, SellersSearchBlock, LinkListBlock, FeedReaderBlock, SlideshowBlock, HighlightsBlock, FeaturedProductsBlock, CategoriesBlock, RawHTMLBlock ] |
10 | 10 | ... | ... |
test/functional/environment_role_manager_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'environment_role_manager_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class EnvironmentRoleManagerController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class EnvironmentRoleManagerControllerTest < Test::Unit::TestCase | |
7 | +class EnvironmentRoleManagerControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = EnvironmentRoleManagerController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/favorite_enterprises_controller_test.rb
... | ... | @@ -3,7 +3,7 @@ require 'favorite_enterprises_controller' |
3 | 3 | |
4 | 4 | class FavoriteEnterprisesController; def rescue_action(e) raise e end; end |
5 | 5 | |
6 | -class FavoriteEnterprisesControllerTest < Test::Unit::TestCase | |
6 | +class FavoriteEnterprisesControllerTest < ActionController::TestCase | |
7 | 7 | |
8 | 8 | noosfero_test :profile => 'testuser' |
9 | 9 | ... | ... |
test/functional/features_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'features_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class FeaturesController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class FeaturesControllerTest < Test::Unit::TestCase | |
7 | +class FeaturesControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | def setup | ... | ... |
test/functional/friends_controller_test.rb
... | ... | @@ -3,7 +3,7 @@ require 'friends_controller' |
3 | 3 | |
4 | 4 | class FriendsController; def rescue_action(e) raise e end; end |
5 | 5 | |
6 | -class FriendsControllerTest < Test::Unit::TestCase | |
6 | +class FriendsControllerTest < ActionController::TestCase | |
7 | 7 | |
8 | 8 | noosfero_test :profile => 'testuser' |
9 | 9 | ... | ... |
test/functional/home_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'home_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class HomeController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class HomeControllerTest < Test::Unit::TestCase | |
7 | +class HomeControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | # all_fixtures:profiles, :environments, :domains |
10 | 10 | all_fixtures | ... | ... |
test/functional/mailconf_controller_test.rb
test/functional/manage_products_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'manage_products_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ManageProductsController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ManageProductsControllerTest < Test::Unit::TestCase | |
7 | +class ManageProductsControllerTest < ActionController::TestCase | |
8 | 8 | all_fixtures |
9 | 9 | def setup |
10 | 10 | @controller = ManageProductsController.new | ... | ... |
test/functional/maps_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'maps_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class MapsController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class MapsControllerTest < Test::Unit::TestCase | |
7 | +class MapsControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | def setup |
10 | 10 | @controller = MapsController.new | ... | ... |
test/functional/memberships_controller_test.rb
... | ... | @@ -5,7 +5,7 @@ require 'memberships_controller' |
5 | 5 | # Re-raise errors caught by the controller. |
6 | 6 | class MembershipsController; def rescue_action(e) raise e end; end |
7 | 7 | |
8 | -class MembershipsControllerTest < Test::Unit::TestCase | |
8 | +class MembershipsControllerTest < ActionController::TestCase | |
9 | 9 | |
10 | 10 | include ApplicationHelper |
11 | 11 | ... | ... |
test/functional/my_profile_controller_test.rb
test/functional/plugins_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'plugins_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class PluginsController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class PluginsControllerTest < Test::Unit::TestCase | |
7 | +class PluginsControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | def setup | ... | ... |
test/functional/profile_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'profile_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ProfileController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ProfileControllerTest < Test::Unit::TestCase | |
7 | +class ProfileControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = ProfileController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/profile_design_controller_test.rb
... | ... | @@ -3,7 +3,7 @@ require 'profile_design_controller' |
3 | 3 | |
4 | 4 | class ProfileDesignController; def rescue_action(e) raise e end; end |
5 | 5 | |
6 | -class ProfileDesignControllerTest < Test::Unit::TestCase | |
6 | +class ProfileDesignControllerTest < ActionController::TestCase | |
7 | 7 | |
8 | 8 | COMMOM_BLOCKS = [ ArticleBlock, TagsBlock, RecentDocumentsBlock, ProfileInfoBlock, LinkListBlock, MyNetworkBlock, FeedReaderBlock, ProfileImageBlock, LocationBlock, SlideshowBlock, ProfileSearchBlock ] |
9 | 9 | PERSON_BLOCKS = COMMOM_BLOCKS + [FriendsBlock, FavoriteEnterprisesBlock, CommunitiesBlock, EnterprisesBlock ] | ... | ... |
test/functional/profile_editor_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'profile_editor_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ProfileEditorController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ProfileEditorControllerTest < Test::Unit::TestCase | |
7 | +class ProfileEditorControllerTest < ActionController::TestCase | |
8 | 8 | all_fixtures |
9 | 9 | |
10 | 10 | def setup | ... | ... |
test/functional/profile_members_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'profile_members_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ProfileMembersController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ProfileMembersControllerTest < Test::Unit::TestCase | |
7 | +class ProfileMembersControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = ProfileMembersController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/profile_search_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'profile_search_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class ProfileSearchController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class ProfileSearchControllerTest < Test::Unit::TestCase | |
7 | +class ProfileSearchControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = ProfileSearchController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/public_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'public_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class PublicController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class PublicControllerTest < Test::Unit::TestCase | |
7 | +class PublicControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | should 'inherit from ApplicationController' do |
10 | 10 | assert_kind_of ApplicationController, PublicController.new | ... | ... |
test/functional/region_validators_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'region_validators_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class RegionValidatorsController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class RegionValidatorsControllerTest < Test::Unit::TestCase | |
7 | +class RegionValidatorsControllerTest < ActionController::TestCase | |
8 | 8 | all_fixtures |
9 | 9 | def setup |
10 | 10 | @controller = RegionValidatorsController.new | ... | ... |
test/functional/role_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'role_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class RoleController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class RoleControllerTest < Test::Unit::TestCase | |
7 | +class RoleControllerTest < ActionController::TestCase | |
8 | 8 | all_fixtures |
9 | 9 | |
10 | 10 | def setup | ... | ... |
test/functional/search_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'search_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class SearchController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class SearchControllerTest < Test::Unit::TestCase | |
7 | +class SearchControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = SearchController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/system_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'system_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class SystemController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class SystemControllerTest < Test::Unit::TestCase | |
7 | +class SystemControllerTest < ActionController::TestCase | |
8 | 8 | def setup |
9 | 9 | @controller = SystemController.new |
10 | 10 | @request = ActionController::TestRequest.new | ... | ... |
test/functional/tasks_controller_test.rb
test/functional/themes_controller_test.rb
... | ... | @@ -3,7 +3,7 @@ require 'themes_controller' |
3 | 3 | |
4 | 4 | class ThemesController; def rescue_action(e) raise e end; end |
5 | 5 | |
6 | -class ThemesControllerTest < Test::Unit::TestCase | |
6 | +class ThemesControllerTest < ActionController::TestCase | |
7 | 7 | |
8 | 8 | def setup |
9 | 9 | @controller = ThemesController.new | ... | ... |
test/functional/users_controller_test.rb
... | ... | @@ -4,7 +4,7 @@ require 'users_controller' |
4 | 4 | # Re-raise errors caught by the controller. |
5 | 5 | class UsersController; def rescue_action(e) raise e end; end |
6 | 6 | |
7 | -class UsersControllerTest < Test::Unit::TestCase | |
7 | +class UsersControllerTest < ActionController::TestCase | |
8 | 8 | |
9 | 9 | all_fixtures |
10 | 10 | def setup | ... | ... |