there are so many side effects by using only a subset of the fixtures and also it creates lots of annoying noise in the test code. this commit changes individual requires to :all which fixes some tests when test files are run individually or in a different order.

pull/1186/head
Martin Linkhorst 12 years ago
parent 962ab95ecb
commit d03301b60e
  1. 2
      test/functional/account_controller_test.rb
  2. 2
      test/functional/admin_controller_test.rb
  3. 3
      test/functional/attachments_controller_test.rb
  4. 2
      test/functional/boards_controller_test.rb
  5. 5
      test/functional/custom_fields_controller_test.rb
  6. 2
      test/functional/documents_controller_test.rb
  7. 2
      test/functional/enumerations_controller_test.rb
  8. 2
      test/functional/groups_controller_test.rb
  9. 2
      test/functional/issue_categories_controller_test.rb
  10. 12
      test/functional/issue_relations_controller_test.rb
  11. 2
      test/functional/issue_statuses_controller_test.rb
  12. 25
      test/functional/issues_controller_test.rb
  13. 24
      test/functional/issues_controller_transaction_test.rb
  14. 5
      test/functional/journals_controller_test.rb
  15. 2
      test/functional/mail_handler_controller_test.rb
  16. 2
      test/functional/members_controller_test.rb
  17. 2
      test/functional/messages_controller_test.rb
  18. 4
      test/functional/my_controller_test.rb
  19. 2
      test/functional/news/comments_controller_test.rb
  20. 2
      test/functional/news_controller_test.rb
  21. 7
      test/functional/projects_controller_test.rb
  22. 5
      test/functional/queries_controller_test.rb
  23. 5
      test/functional/repositories_controller_test.rb
  24. 2
      test/functional/repositories_filesystem_controller_test.rb
  25. 2
      test/functional/repositories_git_controller_test.rb
  26. 5
      test/functional/repositories_subversion_controller_test.rb
  27. 2
      test/functional/roles_controller_test.rb
  28. 6
      test/functional/search_controller_test.rb
  29. 2
      test/functional/settings_controller_test.rb
  30. 2
      test/functional/sys_controller_test.rb
  31. 7
      test/functional/time_entries/reports_controller_test.rb
  32. 2
      test/functional/timelog_controller_test.rb
  33. 8
      test/functional/trackers_controller_test.rb
  34. 11
      test/functional/users_controller_test.rb
  35. 11
      test/functional/versions_controller_test.rb
  36. 3
      test/functional/watchers_controller_test.rb
  37. 4
      test/functional/welcome_controller_test.rb
  38. 2
      test/functional/wiki_controller_test.rb
  39. 2
      test/functional/wikis_controller_test.rb
  40. 2
      test/functional/workflows_controller_test.rb
  41. 2
      test/integration/account_test.rb
  42. 24
      test/integration/api_test/issues_test.rb
  43. 21
      test/integration/api_test/projects_test.rb
  44. 2
      test/integration/api_test/users_test.rb
  45. 16
      test/integration/issues_test.rb
  46. 2
      test/integration/projects_test.rb
  47. 3
      test/unit/activity_test.rb
  48. 2
      test/unit/attachment_test.rb
  49. 2
      test/unit/board_test.rb
  50. 5
      test/unit/changeset_test.rb
  51. 2
      test/unit/document_test.rb
  52. 9
      test/unit/helpers/application_helper_test.rb
  53. 8
      test/unit/helpers/timelog_helper_test.rb
  54. 10
      test/unit/issue_nested_set_test.rb
  55. 2
      test/unit/issue_priority_test.rb
  56. 2
      test/unit/issue_relation_test.rb
  57. 2
      test/unit/issue_status_test.rb
  58. 14
      test/unit/issue_test.rb
  59. 2
      test/unit/journal_test.rb
  60. 2
      test/unit/ldap_auth_source_test.rb
  61. 2
      test/unit/lib/redmine/menu_manager/menu_helper_test.rb
  62. 2
      test/unit/news_test.rb
  63. 6
      test/unit/query_test.rb
  64. 2
      test/unit/repository_filesystem_test.rb
  65. 2
      test/unit/repository_git_test.rb
  66. 2
      test/unit/repository_subversion_test.rb
  67. 2
      test/unit/role_test.rb
  68. 12
      test/unit/search_test.rb
  69. 2
      test/unit/time_entry_activity_test.rb
  70. 2
      test/unit/time_entry_test.rb
  71. 2
      test/unit/token_test.rb
  72. 2
      test/unit/tracker_test.rb
  73. 9
      test/unit/user_test.rb
  74. 9
      test/unit/version_test.rb
  75. 2
      test/unit/wiki_page_test.rb
  76. 2
      test/unit/wiki_redirect_test.rb
  77. 2
      test/unit/wiki_test.rb

@ -18,7 +18,7 @@ require 'account_controller'
class AccountController; def rescue_action(e) raise e end; end
class AccountControllerTest < ActionController::TestCase
fixtures :users, :roles
fixtures :all
def setup
super

@ -18,7 +18,7 @@ require 'admin_controller'
class AdminController; def rescue_action(e) raise e end; end
class AdminControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles
fixtures :all
def setup
@controller = AdminController.new

@ -20,8 +20,7 @@ class AttachmentsController; def rescue_action(e) raise e end; end
class AttachmentsControllerTest < ActionController::TestCase
fixtures :users, :projects, :roles, :members, :member_roles, :enabled_modules, :issues, :trackers, :attachments,
:versions, :wiki_pages, :wikis, :documents
fixtures :all
def setup
@controller = AttachmentsController.new

@ -18,7 +18,7 @@ require 'boards_controller'
class BoardsController; def rescue_action(e) raise e end; end
class BoardsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
fixtures :all
def setup
@controller = BoardsController.new

@ -19,10 +19,7 @@ require 'custom_fields_controller'
class CustomFieldsController; def rescue_action(e) raise e end; end
class CustomFieldsControllerTest < ActionController::TestCase
fixtures :custom_fields,
:custom_field_translations,
:trackers,
:users
fixtures :all
def setup
@controller = CustomFieldsController.new

@ -18,7 +18,7 @@ require 'documents_controller'
class DocumentsController; def rescue_action(e) raise e end; end
class DocumentsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :documents, :enumerations
fixtures :all
def setup
@controller = DocumentsController.new

@ -18,7 +18,7 @@ require 'enumerations_controller'
class EnumerationsController; def rescue_action(e) raise e end; end
class EnumerationsControllerTest < ActionController::TestCase
fixtures :enumerations, :issues, :users
fixtures :all
def setup
@controller = EnumerationsController.new

@ -18,7 +18,7 @@ require 'groups_controller'
class GroupsController; def rescue_action(e) raise e end; end
class GroupsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :roles, :member_roles, :group_users
fixtures :all
def setup
@controller = GroupsController.new

@ -18,7 +18,7 @@ require 'issue_categories_controller'
class IssueCategoriesController; def rescue_action(e) raise e end; end
class IssueCategoriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :enabled_modules, :issues, :issue_categories
fixtures :all
def setup
@controller = IssueCategoriesController.new

@ -20,17 +20,7 @@ class IssueRelationsController; def rescue_action(e) raise e end; end
class IssueRelationsControllerTest < ActionController::TestCase
fixtures :projects,
:users,
:roles,
:members,
:member_roles,
:issues,
:issue_statuses,
:issue_relations,
:enabled_modules,
:enumerations,
:trackers
fixtures :all
def setup
@controller = IssueRelationsController.new

@ -20,7 +20,7 @@ class IssueStatusesController; def rescue_action(e) raise e end; end
class IssueStatusesControllerTest < ActionController::TestCase
fixtures :issue_statuses, :issues
fixtures :all
def setup
super

@ -18,30 +18,7 @@ require 'issues_controller'
class IssuesController; def rescue_action(e) raise e end; end
class IssuesControllerTest < ActionController::TestCase
fixtures :projects,
:users,
:roles,
:members,
:member_roles,
:issues,
:issue_statuses,
:versions,
:trackers,
:projects_trackers,
:issue_categories,
:enabled_modules,
:enumerations,
:attachments,
:workflows,
:custom_fields,
:custom_field_translations,
:custom_values,
:custom_fields_projects,
:custom_fields_trackers,
:time_entries,
:journals,
:queries,
:watchers
fixtures :all
def setup
@controller = IssuesController.new

@ -18,29 +18,7 @@ require 'issues_controller'
class IssuesController; def rescue_action(e) raise e end; end
class IssuesControllerTransactionTest < ActionController::TestCase
fixtures :projects,
:users,
:roles,
:members,
:member_roles,
:issues,
:issue_statuses,
:versions,
:trackers,
:projects_trackers,
:issue_categories,
:enabled_modules,
:enumerations,
:attachments,
:workflows,
:custom_fields,
:custom_field_translations,
:custom_values,
:custom_fields_projects,
:custom_fields_trackers,
:time_entries,
:journals,
:queries
fixtures :all
self.use_transactional_fixtures = false

@ -18,10 +18,7 @@ require 'journals_controller'
class JournalsController; def rescue_action(e) raise e end; end
class JournalsControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles,
:roles, :issues, :journals, :enabled_modules,
:trackers, :issue_statuses, :enumerations,
:custom_fields, :custom_field_translations, :custom_values, :custom_fields_projects
fixtures :all
def setup
@controller = JournalsController.new

@ -18,7 +18,7 @@ require 'mail_handler_controller'
class MailHandlerController; def rescue_action(e) raise e end; end
class MailHandlerControllerTest < ActionController::TestCase
fixtures :users, :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :issue_statuses, :trackers, :enumerations
fixtures :all
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'

@ -19,7 +19,7 @@ class MembersController; def rescue_action(e) raise e end; end
class MembersControllerTest < ActionController::TestCase
fixtures :projects, :members, :member_roles, :roles, :users
fixtures :all
def setup
@controller = MembersController.new

@ -18,7 +18,7 @@ require 'messages_controller'
class MessagesController; def rescue_action(e) raise e end; end
class MessagesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
fixtures :all
def setup
@controller = MessagesController.new

@ -18,9 +18,7 @@ require 'my_controller'
class MyController; def rescue_action(e) raise e end; end
class MyControllerTest < ActionController::TestCase
fixtures :users, :user_preferences, :roles, :projects,
:issues, :issue_statuses, :trackers, :enumerations,
:custom_fields, :custom_field_translations
fixtures :all
def setup
@controller = MyController.new

@ -14,7 +14,7 @@
require File.expand_path('../../../test_helper', __FILE__)
class News::CommentsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news, :comments
fixtures :all
def setup
User.current = nil

@ -18,7 +18,7 @@ require 'news_controller'
class NewsController; def rescue_action(e) raise e end; end
class NewsControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news, :comments
fixtures :all
def setup
@controller = NewsController.new

@ -20,12 +20,7 @@ class ProjectsController; def rescue_action(e) raise e end; end
class ProjectsControllerTest < ActionController::TestCase
include MiniTest::Assertions # refute
fixtures :projects, :versions, :users, :roles, :members,
:member_roles, :issues, :journals,
:trackers, :projects_trackers, :issue_statuses,
:enabled_modules, :enumerations, :boards, :messages,
:attachments, :custom_fields, :custom_field_translations,
:custom_values, :time_entries
fixtures :all
def setup
@controller = ProjectsController.new

@ -18,10 +18,7 @@ require 'queries_controller'
class QueriesController; def rescue_action(e) raise e end; end
class QueriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :members, :member_roles,
:roles, :trackers, :issue_statuses, :issue_categories,
:enumerations, :issues,
:custom_fields, :custom_field_translations, :custom_values, :queries
fixtures :all
def setup
@controller = QueriesController.new

@ -18,10 +18,7 @@ require 'repositories_controller'
class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles,
:repositories, :issues, :issue_statuses, :changesets, :changes,
:issue_categories, :enumerations,
:custom_fields, :custom_field_translations, :custom_values, :trackers
fixtures :all
def setup
@controller = RepositoriesController.new

@ -18,7 +18,7 @@ require 'repositories_controller'
class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesFilesystemControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
fixtures :all
# No '..' in the repository path
REPOSITORY_PATH = Rails.root.to_s.gsub(%r{config\/\.\.}, '') + '/tmp/test/filesystem_repository'

@ -18,7 +18,7 @@ require 'repositories_controller'
class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesGitControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :repositories, :enabled_modules
fixtures :all
# No '..' in the repository path
REPOSITORY_PATH = Rails.root.to_s.gsub(%r{config\/\.\.}, '') + '/tmp/test/git_repository'

@ -18,10 +18,7 @@ require 'repositories_controller'
class RepositoriesController; def rescue_action(e) raise e end; end
class RepositoriesSubversionControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
:repositories, :issues, :issue_statuses, :changesets, :changes,
:issue_categories, :enumerations, :custom_fields, :custom_field_translations,
:custom_values, :trackers
fixtures :all
PRJ_ID = 3

@ -18,7 +18,7 @@ require 'roles_controller'
class RolesController; def rescue_action(e) raise e end; end
class RolesControllerTest < ActionController::TestCase
fixtures :roles, :users, :members, :member_roles, :workflows, :trackers
fixtures :all
def setup
@controller = RolesController.new

@ -19,11 +19,7 @@ require 'search_controller'
class SearchController; def rescue_action(e) raise e end; end
class SearchControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles, :users, :members, :member_roles,
:issues, :trackers, :issue_statuses,
:custom_fields, :custom_field_translations,
:custom_values,
:repositories, :changesets
fixtures :all
def setup
@controller = SearchController.new

@ -19,7 +19,7 @@ require 'settings_controller'
class SettingsController; def rescue_action(e) raise e end; end
class SettingsControllerTest < ActionController::TestCase
fixtures :users
fixtures :all
def setup
@controller = SettingsController.new

@ -20,7 +20,7 @@ require 'mocha/setup'
class SysController; def rescue_action(e) raise e end; end
class SysControllerTest < ActionController::TestCase
fixtures :projects, :repositories, :enabled_modules
fixtures :all
def setup
@controller = SysController.new

@ -15,12 +15,7 @@
require File.expand_path('../../../test_helper', __FILE__)
class TimeEntries::ReportsControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles,
:members, :member_roles, :issues,
:time_entries, :users, :trackers,
:enumerations, :issue_statuses,
:custom_fields, :custom_field_translations,
:custom_values
fixtures :all
def test_report_at_project_level
get :show, :project_id => 'ecookbook'

@ -19,7 +19,7 @@ require 'timelog_controller'
class TimelogController; def rescue_action(e) raise e end; end
class TimelogControllerTest < ActionController::TestCase
fixtures :projects, :enabled_modules, :roles, :members, :member_roles, :issues, :time_entries, :users, :trackers, :enumerations, :issue_statuses, :custom_fields, :custom_values
fixtures :all
def setup
@controller = TimelogController.new

@ -18,13 +18,7 @@ require 'trackers_controller'
class TrackersController; def rescue_action(e) raise e end; end
class TrackersControllerTest < ActionController::TestCase
fixtures :trackers,
:projects,
:projects_trackers,
:users,
:issues,
:custom_fields,
:custom_field_translations
fixtures :all
def setup
@controller = TrackersController.new

@ -21,16 +21,7 @@ class UsersController; def rescue_action(e) raise e end; end
class UsersControllerTest < ActionController::TestCase
include Redmine::I18n
fixtures :users,
:projects,
:members,
:member_roles,
:roles,
:auth_sources,
:custom_fields,
:custom_field_translations,
:custom_values,
:group_users
fixtures :all
def setup
@controller = UsersController.new

@ -19,16 +19,7 @@ require 'versions_controller'
class VersionsController; def rescue_action(e) raise e end; end
class VersionsControllerTest < ActionController::TestCase
fixtures :projects,
:versions,
:issues,
:users,
:roles,
:members,
:member_roles,
:enabled_modules,
:issue_statuses,
:enumerations
fixtures :all
def setup
@controller = VersionsController.new

@ -18,8 +18,7 @@ require 'watchers_controller'
class WatchersController; def rescue_action(e) raise e end; end
class WatchersControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
:issues, :trackers, :projects_trackers, :issue_statuses, :enumerations, :watchers
fixtures :all
def setup
@controller = WatchersController.new

@ -18,9 +18,7 @@ require 'welcome_controller'
class WelcomeController; def rescue_action(e) raise e end; end
class WelcomeControllerTest < ActionController::TestCase
fixtures :projects,
:news,
:users
fixtures :all
def setup
@controller = WelcomeController.new

@ -18,7 +18,7 @@ require 'wiki_controller'
class WikiController; def rescue_action(e) raise e end; end
class WikiControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :journals, :attachments
fixtures :all
def setup
@controller = WikiController.new

@ -18,7 +18,7 @@ require 'wikis_controller'
class WikisController; def rescue_action(e) raise e end; end
class WikisControllerTest < ActionController::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis
fixtures :all
def setup
@controller = WikisController.new

@ -18,7 +18,7 @@ require 'workflows_controller'
class WorkflowsController; def rescue_action(e) raise e end; end
class WorkflowsControllerTest < ActionController::TestCase
fixtures :roles, :trackers, :workflows, :users, :issue_statuses
fixtures :all
def setup
@controller = WorkflowsController.new

@ -20,7 +20,7 @@ rescue
end
class AccountTest < ActionDispatch::IntegrationTest
fixtures :users, :roles
fixtures :all
# Replace this with your real tests.
def test_login

@ -14,29 +14,7 @@
require File.expand_path('../../../test_helper', __FILE__)
class ApiTest::IssuesTest < ActionController::IntegrationTest
fixtures :projects,
:users,
:roles,
:members,
:member_roles,
:issues,
:issue_statuses,
:versions,
:trackers,
:projects_trackers,
:issue_categories,
:enabled_modules,
:enumerations,
:attachments,
:workflows,
:custom_fields,
:custom_field_translations,
:custom_values,
:custom_fields_projects,
:custom_fields_trackers,
:time_entries,
:journals,
:queries
fixtures :all
def setup
Setting.rest_api_enabled = '1'

@ -14,26 +14,7 @@
require File.expand_path('../../../test_helper', __FILE__)
class ApiTest::ProjectsTest < ActionController::IntegrationTest
fixtures :projects,
:versions,
:users,
:roles,
:members,
:member_roles,
:issues,
:journals,
:trackers,
:projects_trackers,
:issue_statuses,
:enabled_modules,
:enumerations,
:boards,
:messages,
:attachments,
:custom_fields,
:custom_field_translations,
:custom_values,
:time_entries
fixtures :all
def setup
Setting.rest_api_enabled = '1'

@ -14,7 +14,7 @@
require File.expand_path('../../../test_helper', __FILE__)
class ApiTest::UsersTest < ActionController::IntegrationTest
fixtures :users
fixtures :all
def setup
Setting.rest_api_enabled = '1'

@ -14,21 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class IssuesTest < ActionController::IntegrationTest
fixtures :projects,
:users,
:roles,
:members,
:member_roles,
:trackers,
:projects_trackers,
:enabled_modules,
:issue_statuses,
:issues,
:enumerations,
:custom_fields,
:custom_field_translations,
:custom_values,
:custom_fields_trackers
fixtures :all
# create an issue
def test_add_issue

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class ProjectsTest < ActionController::IntegrationTest
fixtures :projects, :users, :members
fixtures :all
def test_archive_project
subproject = Project.find(1).children.first

@ -14,8 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class ActivityTest < ActiveSupport::TestCase
fixtures :projects, :versions, :attachments, :users, :roles, :members, :member_roles, :issues, :journals,
:trackers, :projects_trackers, :issue_statuses, :enabled_modules, :enumerations, :boards, :messages
fixtures :all
def setup
@project = Project.find(1)

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class AttachmentTest < ActiveSupport::TestCase
fixtures :issues, :users
fixtures :all
def setup
end

@ -15,7 +15,7 @@
require File.expand_path('../../test_helper', __FILE__)
class BoardTest < ActiveSupport::TestCase
fixtures :projects, :boards, :messages, :attachments, :watchers
fixtures :all
def setup
@project = Project.find(1)

@ -14,10 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class ChangesetTest < ActiveSupport::TestCase
fixtures :projects, :repositories, :issues, :issue_statuses,
:changesets, :changes, :issue_categories, :enumerations,
:custom_fields, :custom_field_translations, :custom_values,
:users, :members, :member_roles, :trackers
fixtures :all
def setup
super

@ -16,7 +16,7 @@ require_relative '../test_helper'
class DocumentTest < ActiveSupport::TestCase
include MiniTest::Assertions # refute
#fixtures :projects, :enumerations, :documents, :attachments
fixtures :all
def setup
@documentation_category = FactoryGirl.create :document_category, :name => 'User documentation'

@ -14,14 +14,7 @@
require File.expand_path('../../../test_helper', __FILE__)
class ApplicationHelperTest < ActionView::TestCase
fixtures :projects, :roles, :enabled_modules, :users,
:repositories, :changesets,
:trackers, :issue_statuses, :issues, :versions, :documents,
:wikis, :wiki_pages, :wiki_contents,
:boards, :messages,
:attachments,
:enumerations
fixtures :all
def setup
super

@ -18,13 +18,7 @@ class TimelogHelperTest < HelperTestCase
include ActionView::Helpers::TextHelper
include ActionView::Helpers::DateHelper
fixtures :projects, :roles, :enabled_modules, :users,
:repositories, :changesets,
:trackers, :issue_statuses, :issues, :versions, :documents,
:wikis, :wiki_pages, :wiki_contents,
:boards, :messages,
:attachments,
:enumerations
fixtures :all
def setup
super

@ -16,15 +16,7 @@ require File.expand_path('../../test_helper', __FILE__)
class IssueNestedSetTest < ActiveSupport::TestCase
include MiniTest::Assertions # refute
fixtures :projects, :users, :members, :member_roles, :roles,
:trackers, :projects_trackers,
:versions,
:issue_statuses, :issue_categories, :issue_relations, :workflows,
:enumerations,
:issues,
:custom_fields, :custom_field_translations,
:custom_fields_projects, :custom_fields_trackers, :custom_values,
:time_entries
fixtures :all
self.use_transactional_fixtures = false

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class IssuePriorityTest < ActiveSupport::TestCase
fixtures :enumerations, :issues
fixtures :all
def test_should_be_an_enumeration
assert IssuePriority.ancestors.include?(Enumeration)

@ -16,7 +16,7 @@ require File.expand_path('../../test_helper', __FILE__)
class IssueRelationTest < ActiveSupport::TestCase
include MiniTest::Assertions # refute
fixtures :issue_relations, :issues
fixtures :all
def test_create
from = Issue.find(1)

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class IssueStatusTest < ActiveSupport::TestCase
fixtures :issue_statuses, :issues, :roles, :trackers
fixtures :all
def test_create
status = IssueStatus.new :name => "Assigned"

@ -16,19 +16,7 @@ require File.expand_path('../../test_helper', __FILE__)
class IssueTest < ActiveSupport::TestCase
include MiniTest::Assertions # refute
fixtures :projects, :users, :members, :member_roles, :roles,
:trackers, :projects_trackers,
:enabled_modules,
:versions,
:issue_statuses, :issue_categories, :issue_relations, :workflows,
:enumerations,
:issues,
:custom_fields,
:custom_field_translations,
:custom_fields_projects,
:custom_fields_trackers,
:custom_values,
:time_entries
fixtures :all
def test_create
issue = Issue.new.tap do |i|

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class JournalTest < ActiveSupport::TestCase
fixtures :issues, :issue_statuses, :journals, :enumerations, :projects, :users, :trackers, :watchers, :members, :member_roles, :roles, :enabled_modules
fixtures :all
def setup
@journal = IssueJournal.find(1)

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class LdapAuthSourceTest < ActiveSupport::TestCase
fixtures :auth_sources
fixtures :all
def setup
end

@ -18,7 +18,7 @@ require File.expand_path('../../../../../test_helper', __FILE__)
class Redmine::MenuManager::MenuHelperTest < HelperTestCase
include Redmine::MenuManager::MenuHelper
include ActionDispatch::Assertions::SelectorAssertions
fixtures :users, :members, :projects, :enabled_modules
fixtures :all
# Used by assert_select
def html_document

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class NewsTest < ActiveSupport::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news
fixtures :all
def valid_news
{ :title => 'Test news', :description => 'Lorem ipsum etc', :author => User.find(:first) }

@ -14,11 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class QueryTest < ActiveSupport::TestCase
fixtures :projects, :enabled_modules, :users,
:members, :member_roles, :roles, :trackers,
:issue_statuses, :issue_categories, :enumerations,
:issues, :watchers, :versions, :queries,
:custom_fields, :custom_field_translations, :custom_values
fixtures :all
def test_custom_fields_for_all_projects_should_be_available_in_global_queries
query = Query.new(:project => nil, :name => '_')

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class RepositoryFilesystemTest < ActiveSupport::TestCase
fixtures :projects
fixtures :all
# No '..' in the repository path
REPOSITORY_PATH = Rails.root.to_s.gsub(%r{config\/\.\.}, '') + '/tmp/test/filesystem_repository'

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class RepositoryGitTest < ActiveSupport::TestCase
fixtures :projects, :repositories, :enabled_modules, :users, :roles
fixtures :all
# No '..' in the repository path
REPOSITORY_PATH = Rails.root.to_s.gsub(%r{config\/\.\.}, '') + '/tmp/test/git_repository'

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class RepositorySubversionTest < ActiveSupport::TestCase
fixtures :projects, :repositories, :enabled_modules, :users, :roles
fixtures :all
def setup
@project = Project.find(3)

@ -14,7 +14,7 @@
require 'test_helper'
class RoleTest < ActiveSupport::TestCase
fixtures :roles, :workflows, :trackers
fixtures :all
def test_copy_workflows
source = Role.find(1)

@ -14,17 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class SearchTest < ActiveSupport::TestCase
fixtures :users,
:members,
:member_roles,
:projects,
:roles,
:enabled_modules,
:issues,
:trackers,
:journals,
:repositories,
:changesets
fixtures :all
def setup
@project = Project.find(1)

@ -16,7 +16,7 @@ require File.expand_path('../../test_helper', __FILE__)
class TimeEntryActivityTest < ActiveSupport::TestCase
include MiniTest::Assertions # refute
fixtures :enumerations, :time_entries, :custom_fields, :custom_field_translations
fixtures :all
def test_should_be_an_enumeration

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class TimeEntryTest < ActiveSupport::TestCase
fixtures :issues, :projects, :users, :time_entries, :roles, :enabled_modules
fixtures :all
def test_hours_format
assertions = { "2" => 2.0,

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class TokenTest < ActiveSupport::TestCase
fixtures :tokens, :users
fixtures :all
def test_create
token = Token.new

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class TrackerTest < ActiveSupport::TestCase
fixtures :trackers, :workflows, :issue_statuses, :roles
fixtures :all
def test_copy_workflows
source = Tracker.find(1)

@ -16,14 +16,7 @@ require File.expand_path('../../test_helper', __FILE__)
class UserTest < ActiveSupport::TestCase
include MiniTest::Assertions # refute
fixtures :users,
:members,
:projects,
:projects_trackers,
:trackers,
:roles,
:member_roles,
:auth_sources
fixtures :all
def setup
@admin = User.find(1)

@ -14,14 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class VersionTest < ActiveSupport::TestCase
fixtures :projects,
:users,
:issues,
:issue_statuses,
:trackers,
:projects_trackers,
:enumerations,
:versions
fixtures :all
def setup
end

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class WikiPageTest < ActiveSupport::TestCase
fixtures :projects, :wikis, :wiki_pages, :wiki_contents, :journals
fixtures :all
def setup
@wiki = Wiki.find(1)

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class WikiRedirectTest < ActiveSupport::TestCase
fixtures :projects, :wikis, :wiki_pages
fixtures :all
def setup
@wiki = Wiki.find(1)

@ -14,7 +14,7 @@
require File.expand_path('../../test_helper', __FILE__)
class WikiTest < ActiveSupport::TestCase
fixtures :projects, :wikis, :wiki_pages, :wiki_contents, :journals
fixtures :all
def test_create
wiki = Wiki.new(:project => Project.find(2))

Loading…
Cancel
Save