Project

General

Profile

Patch #41961 ยป 0001-Use-fixtures-all-to-ensure-consistent-test-data.patch

Katsuya HIDAKA, 2024-12-09 14:00

View differences:

test/extra/redmine_pm/repository_git_test_pm.rb
21 21
require 'tmpdir'
22 22

  
23 23
class RedminePmTest::RepositoryGitTest < RedminePmTest::TestCase
24
  fixtures :projects, :users, :members, :roles, :member_roles
25

  
26 24
  GIT_BIN = Redmine::Configuration['scm_git_command'] || "git"
27 25

  
28 26
  def test_anonymous_read_on_public_repo_with_permission_should_succeed
test/extra/redmine_pm/repository_subversion_test_pm.rb
21 21
require 'tmpdir'
22 22

  
23 23
class RedminePmTest::RepositorySubversionTest < RedminePmTest::TestCase
24
  fixtures :projects, :users, :members, :roles, :member_roles, :auth_sources, :enabled_modules
25

  
26 24
  SVN_BIN = Redmine::Configuration['scm_subversion_command'] || "svn"
27 25

  
28 26
  def test_anonymous_read_on_public_repo_with_permission_should_succeed
test/functional/account_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class AccountControllerTest < Redmine::ControllerTest
23
  fixtures :users, :email_addresses, :roles
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
  end
test/functional/activities_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class ActivitiesControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :enumerations, :users, :issue_categories,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :groups_users,
30
           :enabled_modules,
31
           :journals, :journal_details,
32
           :attachments, :changesets, :documents, :messages, :news, :time_entries, :wiki_content_versions
33

  
34 23
  def test_project_index
35 24
    get(
36 25
      :index,
test/functional/admin_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class AdminControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :email_addresses, :roles
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
    @request.session[:user_id] = 1 # admin
test/functional/attachments_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class AttachmentsControllerTest < Redmine::ControllerTest
23
  fixtures :users, :user_preferences, :projects, :roles, :members, :member_roles,
24
           :enabled_modules, :issues, :trackers, :attachments, :issue_statuses, :journals, :journal_details,
25
           :versions, :wiki_pages, :wikis, :documents, :enumerations
26

  
27 23
  def setup
28 24
    User.current = nil
29 25
    set_fixtures_attachments_directory
test/functional/attachments_visibility_test.rb
21 21

  
22 22
class AttachmentsVisibilityTest < Redmine::ControllerTest
23 23
  tests AttachmentsController
24
  fixtures :users, :email_addresses, :projects, :roles, :members, :member_roles,
25
           :enabled_modules, :projects_trackers, :issue_statuses, :enumerations,
26
           :issues, :trackers, :versions,
27
           :custom_fields, :custom_fields_trackers, :custom_fields_projects
28

  
29 24
  def setup
30 25
    User.current = nil
31 26
    set_tmp_attachments_directory
test/functional/auth_sources_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class AuthSourcesControllerTest < Redmine::ControllerTest
23
  fixtures :users, :auth_sources
24

  
25 23
  def setup
26 24
    @request.session[:user_id] = 1
27 25
  end
test/functional/auto_completes_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class AutoCompletesControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :issues, :issue_statuses,
24
           :enumerations, :users, :issue_categories,
25
           :trackers,
26
           :projects_trackers,
27
           :roles,
28
           :member_roles,
29
           :members,
30
           :enabled_modules,
31
           :journals, :journal_details,
32
           :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
33

  
34 23
  def test_issues_should_not_be_case_sensitive
35 24
    get(
36 25
      :issues,
test/functional/boards_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class BoardsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :members, :member_roles, :roles, :boards, :messages, :enabled_modules
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
  end
test/functional/calendars_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class CalendarsControllerTest < Redmine::ControllerTest
23
  fixtures :projects,
24
           :trackers,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :enabled_modules,
30
           :issues,
31
           :issue_statuses,
32
           :issue_relations,
33
           :issue_categories,
34
           :enumerations,
35
           :queries,
36
           :users, :email_addresses,
37
           :versions
38

  
39 23
  def test_show
40 24
    # Ensure that an issue to which a user is assigned is in the current
41 25
    # month's calendar in order to test Gravatar
test/functional/comments_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class CommentsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules, :news, :comments
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
  end
test/functional/context_menus_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class ContextMenusControllerTest < Redmine::ControllerTest
23
  fixtures :projects,
24
           :trackers,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :enabled_modules,
30
           :workflows,
31
           :journals, :journal_details,
32
           :versions,
33
           :issues, :issue_statuses, :issue_categories,
34
           :users,
35
           :enumerations,
36
           :time_entries,
37
           :custom_fields, :custom_fields_trackers, :custom_fields_projects
38

  
39 23
  def test_context_menu_one_issue_should_link_to_issue_path
40 24
    @request.session[:user_id] = 2
41 25
    get(
test/functional/custom_field_enumerations_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class CustomFieldEnumerationsControllerTest < Redmine::ControllerTest
23
  fixtures :users, :email_addresses
24

  
25 23
  def setup
26 24
    @request.session[:user_id] = 1
27 25
    @field = GroupCustomField.create!(:name => 'List', :field_format => 'enumeration', :is_required => false)
test/functional/custom_fields_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class CustomFieldsControllerTest < Redmine::ControllerTest
23
  fixtures :custom_fields, :custom_values,
24
           :custom_fields_projects, :custom_fields_trackers,
25
           :roles, :users,
26
           :members, :member_roles,
27
           :groups_users,
28
           :trackers, :projects_trackers,
29
           :enabled_modules,
30
           :projects, :issues,
31
           :issue_statuses,
32
           :issue_categories,
33
           :enumerations,
34
           :workflows
35

  
36 23
  def setup
37 24
    @request.session[:user_id] = 1
38 25
  end
test/functional/documents_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class DocumentsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
24
           :enabled_modules, :documents, :enumerations,
25
           :groups_users, :attachments, :user_preferences
26

  
27 23
  def setup
28 24
    User.current = nil
29 25
  end
test/functional/email_addresses_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class EmailAddressesControllerTest < Redmine::ControllerTest
23
  fixtures :users, :email_addresses
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
  end
test/functional/enumerations_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class EnumerationsControllerTest < Redmine::ControllerTest
23
  fixtures :enumerations, :issues, :users
24

  
25 23
  def setup
26 24
    @request.session[:user_id] = 1 # admin
27 25
  end
test/functional/files_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class FilesControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :enumerations, :users,
25
           :email_addresses,
26
           :issue_categories,
27
           :projects_trackers,
28
           :roles,
29
           :member_roles,
30
           :members,
31
           :enabled_modules,
32
           :journals, :journal_details,
33
           :attachments,
34
           :versions
35

  
36 23
  def setup
37 24
    @request.session[:user_id] = nil
38 25
    Setting.default_language = 'en'
test/functional/gantts_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class GanttsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :enumerations, :users, :issue_categories,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :enabled_modules,
30
           :versions,
31
           :email_addresses
32

  
33 23
  def test_gantt_should_work
34 24
    i2 = Issue.find(2)
35 25
    i2.update_attribute(:due_date, 1.month.from_now)
test/functional/groups_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class GroupsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :members, :member_roles, :roles, :groups_users
24

  
25 23
  def setup
26 24
    @request.session[:user_id] = 1
27 25
  end
test/functional/help_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class HelpControllerTest < Redmine::ControllerTest
23
  fixtures :users, :email_addresses
24

  
25 23
  def test_get_help_wiki_syntax
26 24
    formatters = {
27 25
      :textile => "Wiki Syntax Quick Reference",
test/functional/imports_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class ImportsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :enabled_modules,
24
           :users, :email_addresses, :user_preferences,
25
           :roles, :members, :member_roles,
26
           :issues, :issue_statuses,
27
           :trackers, :projects_trackers,
28
           :versions,
29
           :issue_categories,
30
           :enumerations,
31
           :workflows,
32
           :custom_fields,
33
           :custom_values,
34
           :custom_fields_projects,
35
           :custom_fields_trackers
36

  
37 23
  include Redmine::I18n
38 24

  
39 25
  def setup
test/functional/issue_categories_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class IssueCategoriesControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :members, :member_roles, :roles, :enabled_modules, :issue_categories,
24
           :issues
25

  
26 23
  def setup
27 24
    User.current = nil
28 25
    @request.session[:user_id] = 2
test/functional/issue_relations_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class IssueRelationsControllerTest < Redmine::ControllerTest
23
  fixtures :projects,
24
           :users,
25
           :roles,
26
           :members,
27
           :member_roles,
28
           :issues,
29
           :issue_statuses,
30
           :issue_relations,
31
           :enabled_modules,
32
           :enumerations,
33
           :trackers,
34
           :projects_trackers
35

  
36 23
  def setup
37 24
    User.current = nil
38 25
    @request.session[:user_id] = 3
test/functional/issue_statuses_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class IssueStatusesControllerTest < Redmine::ControllerTest
23
  fixtures :issue_statuses, :issues, :users, :trackers, :workflows
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
    @request.session[:user_id] = 1 # admin
test/functional/issues_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class IssuesControllerTest < Redmine::ControllerTest
23
  fixtures :projects,
24
           :users, :email_addresses, :user_preferences,
25
           :roles,
26
           :members,
27
           :member_roles,
28
           :issues,
29
           :issue_statuses,
30
           :issue_relations,
31
           :versions,
32
           :trackers,
33
           :projects_trackers,
34
           :issue_categories,
35
           :enabled_modules,
36
           :enumerations,
37
           :attachments,
38
           :workflows,
39
           :custom_fields,
40
           :custom_values,
41
           :custom_fields_projects,
42
           :custom_fields_trackers,
43
           :time_entries,
44
           :journals,
45
           :journal_details,
46
           :queries,
47
           :repositories,
48
           :changesets,
49
           :watchers, :groups_users
50

  
51 23
  include Redmine::I18n
52 24

  
53 25
  def setup
test/functional/issues_controller_transaction_test.rb
22 22

  
23 23
class IssuesControllerTransactionTest < Redmine::ControllerTest
24 24
  tests IssuesController
25
  fixtures :projects,
26
           :users,
27
           :roles,
28
           :members,
29
           :member_roles,
30
           :issues,
31
           :issue_statuses,
32
           :versions,
33
           :trackers,
34
           :projects_trackers,
35
           :issue_categories,
36
           :enabled_modules,
37
           :enumerations,
38
           :attachments,
39
           :workflows,
40
           :custom_fields,
41
           :custom_values,
42
           :custom_fields_projects,
43
           :custom_fields_trackers,
44
           :time_entries,
45
           :journals,
46
           :journal_details,
47
           :queries
48

  
49 25
  self.use_transactional_tests = false
50 26

  
51 27
  def setup
test/functional/issues_custom_fields_visibility_test.rb
21 21

  
22 22
class IssuesCustomFieldsVisibilityTest < Redmine::ControllerTest
23 23
  tests IssuesController
24
  fixtures :projects,
25
           :users, :email_addresses, :user_preferences,
26
           :roles,
27
           :members,
28
           :member_roles,
29
           :issue_statuses,
30
           :trackers,
31
           :projects_trackers,
32
           :enabled_modules,
33
           :enumerations,
34
           :workflows,
35
           :custom_fields, :custom_fields_trackers
36

  
37 24
  def setup
38 25
    CustomField.destroy_all
39 26
    Issue.delete_all
test/functional/journals_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class JournalsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :members, :member_roles, :roles,
24
           :issues, :journals, :journal_details, :enabled_modules,
25
           :trackers, :issue_statuses, :enumerations, :custom_fields,
26
           :custom_values, :custom_fields_projects, :projects_trackers
27

  
28 23
  def setup
29 24
    User.current = nil
30 25
  end
test/functional/mail_handler_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class MailHandlerControllerTest < Redmine::ControllerTest
23
  fixtures :users, :email_addresses, :projects, :enabled_modules,
24
           :roles, :members, :member_roles, :issues, :issue_statuses,
25
           :trackers, :projects_trackers, :enumerations, :versions
26

  
27 23
  FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'
28 24

  
29 25
  def setup
test/functional/members_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class MembersControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :members, :member_roles, :roles, :users
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
    @request.session[:user_id] = 2
test/functional/messages_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class MessagesControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :email_addresses, :user_preferences, :members, :member_roles, :roles, :boards, :messages, :enabled_modules,
24
           :watchers
25

  
26 23
  def setup
27 24
    User.current = nil
28 25
  end
test/functional/my_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class MyControllerTest < Redmine::ControllerTest
23
  fixtures :users, :email_addresses, :user_preferences,
24
           :roles, :projects, :members, :member_roles,
25
           :issues, :issue_statuses, :trackers, :enumerations,
26
           :custom_fields, :auth_sources, :queries, :enabled_modules,
27
           :journals, :projects_trackers, :issue_categories
28

  
29 23
  def setup
30 24
    @request.session[:user_id] = 2
31 25
  end
test/functional/news_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class NewsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
24
           :enabled_modules, :news, :comments,
25
           :attachments, :user_preferences
26

  
27 23
  def setup
28 24
    User.current = nil
29 25
  end
test/functional/previews_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class PreviewsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :enumerations, :users, :issue_categories,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :enabled_modules,
30
           :journals, :journal_details,
31
           :news
32

  
33 23
  def test_preview_new_issue_description
34 24
    @request.session[:user_id] = 2
35 25
    post(
test/functional/principal_memberships_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class PrincipalMembershipsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :members, :member_roles, :roles, :groups_users
24

  
25 23
  def setup
26 24
    @request.session[:user_id] = 1
27 25
  end
test/functional/project_enumerations_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class ProjectEnumerationsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :enumerations, :users, :issue_categories,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :enabled_modules,
30
           :custom_fields, :custom_fields_projects,
31
           :custom_fields_trackers, :custom_values,
32
           :time_entries
33

  
34 23
  self.use_transactional_tests = false
35 24

  
36 25
  def setup
test/functional/projects_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class ProjectsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :versions, :users, :email_addresses, :roles, :members,
24
           :member_roles, :issues, :journals, :journal_details,
25
           :trackers, :projects_trackers, :issue_statuses,
26
           :enabled_modules, :enumerations, :boards, :messages,
27
           :attachments, :custom_fields, :custom_values, :time_entries,
28
           :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions,
29
           :roles, :queries, :issue_categories
30

  
31 23
  include Redmine::I18n
32 24

  
33 25
  def setup
test/functional/queries_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class QueriesControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :enabled_modules,
24
           :users, :email_addresses,
25
           :members, :member_roles, :roles,
26
           :trackers, :issue_statuses, :issue_categories, :enumerations, :versions,
27
           :issues, :custom_fields, :custom_values,
28
           :queries
29

  
30 23
  def setup
31 24
    User.current = nil
32 25
  end
test/functional/reports_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class ReportsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :enumerations, :users, :issue_categories,
25
           :projects_trackers,
26
           :roles,
27
           :member_roles,
28
           :members,
29
           :enabled_modules,
30
           :versions,
31
           :workflows
32

  
33 23
  def test_get_issue_report
34 24
    get(
35 25
      :issue_report,
test/functional/repositories_bazaar_controller_test.rb
22 22
class RepositoriesBazaarControllerTest < Redmine::RepositoryControllerTest
23 23
  tests RepositoriesController
24 24

  
25
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
26
           :repositories, :enabled_modules
27

  
28 25
  REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository').to_s
29 26
  REPOSITORY_PATH_TRUNK = File.join(REPOSITORY_PATH, "trunk")
30 27
  PRJ_ID = 3
test/functional/repositories_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class RepositoriesControllerTest < Redmine::RepositoryControllerTest
23
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules,
24
           :repositories, :issues, :issue_statuses, :changesets, :changes,
25
           :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
26

  
27 23
  def setup
28 24
    super
29 25
    User.current = nil
test/functional/repositories_cvs_controller_test.rb
22 22
class RepositoriesCvsControllerTest < Redmine::RepositoryControllerTest
23 23
  tests RepositoriesController
24 24

  
25
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
26
           :repositories, :enabled_modules
27

  
28 25
  REPOSITORY_PATH = Rails.root.join('tmp/test/cvs_repository').to_s
29 26
  REPOSITORY_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
30 27
  # CVS module
test/functional/repositories_filesystem_controller_test.rb
22 22
class RepositoriesFilesystemControllerTest < Redmine::RepositoryControllerTest
23 23
  tests RepositoriesController
24 24

  
25
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
26
           :repositories, :enabled_modules
27

  
28 25
  REPOSITORY_PATH = Rails.root.join('tmp/test/filesystem_repository').to_s
29 26
  PRJ_ID = 3
30 27

  
test/functional/repositories_git_controller_test.rb
22 22
class RepositoriesGitControllerTest < Redmine::RepositoryControllerTest
23 23
  tests RepositoriesController
24 24

  
25
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
26
           :repositories, :enabled_modules
27

  
28 25
  REPOSITORY_PATH = Rails.root.join('tmp/test/git_repository').to_s
29 26
  REPOSITORY_PATH.tr!('/', "\\") if Redmine::Platform.mswin?
30 27
  PRJ_ID     = 3
test/functional/repositories_mercurial_controller_test.rb
22 22
class RepositoriesMercurialControllerTest < Redmine::RepositoryControllerTest
23 23
  tests RepositoriesController
24 24

  
25
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
26
           :repositories, :enabled_modules
27

  
28 25
  REPOSITORY_PATH = Rails.root.join('tmp/test/mercurial_repository').to_s
29 26
  PRJ_ID     = 3
30 27
  NUM_REV    = 43
test/functional/repositories_subversion_controller_test.rb
22 22
class RepositoriesSubversionControllerTest < Redmine::RepositoryControllerTest
23 23
  tests RepositoriesController
24 24

  
25
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules,
26
           :repositories, :issues, :issue_statuses, :changesets, :changes,
27
           :issue_categories, :enumerations, :custom_fields, :custom_values, :trackers
28

  
29 25
  PRJ_ID = 3
30 26
  NUM_REV = 16
31 27

  
test/functional/roles_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class RolesControllerTest < Redmine::ControllerTest
23
  fixtures :roles, :users, :members, :member_roles, :workflows, :trackers
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
    @request.session[:user_id] = 1 # admin
test/functional/search_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class SearchControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :projects_trackers,
24
           :enabled_modules, :roles, :users, :members, :member_roles,
25
           :issues, :trackers, :issue_statuses, :enumerations,
26
           :issue_categories, :workflows,
27
           :custom_fields, :custom_values,
28
           :custom_fields_projects, :custom_fields_trackers,
29
           :repositories, :changesets,
30
           :user_preferences
31

  
32 23
  def setup
33 24
    User.current = nil
34 25
  end
test/functional/search_custom_fields_visibility_test.rb
21 21

  
22 22
class SearchCustomFieldsVisibilityTest < Redmine::ControllerTest
23 23
  tests SearchController
24
  fixtures :projects,
25
           :users,
26
           :roles,
27
           :members,
28
           :member_roles,
29
           :issue_statuses,
30
           :trackers,
31
           :projects_trackers,
32
           :enabled_modules,
33
           :enumerations,
34
           :workflows,
35
           :custom_fields, :custom_fields_trackers
36

  
37 24
  def setup
38 25
    field_attributes = {:field_format => 'string', :is_for_all => true, :is_filter => true, :searchable => true, :trackers => Tracker.all}
39 26
    @fields = []
test/functional/sessions_controller_test.rb
23 23
  include Redmine::I18n
24 24
  tests WelcomeController
25 25

  
26
  fixtures :users, :email_addresses
27

  
28 26
  def setup
29 27
    Rails.application.config.redmine_verify_sessions = true
30 28
  end
test/functional/settings_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class SettingsControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :trackers, :issue_statuses, :issues,
24
           :users, :email_addresses
25

  
26 23
  def setup
27 24
    User.current = nil
28 25
    @request.session[:user_id] = 1 # admin
test/functional/sys_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class SysControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :repositories, :enabled_modules
24

  
25 23
  def setup
26 24
    Setting.sys_api_enabled = '1'
27 25
    Setting.enabled_scm = %w(Subversion Git)
test/functional/timelog_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class TimelogControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :enabled_modules, :roles, :members,
24
           :member_roles, :issues, :time_entries, :users, :email_addresses,
25
           :trackers, :enumerations, :issue_statuses,
26
           :custom_fields, :custom_values,
27
           :projects_trackers, :custom_fields_trackers,
28
           :custom_fields_projects, :issue_categories, :versions
29

  
30 23
  include Redmine::I18n
31 24

  
32 25
  def setup
test/functional/timelog_custom_fields_visibility_test.rb
21 21

  
22 22
class TimelogCustomFieldsVisibilityTest < Redmine::ControllerTest
23 23
  tests TimelogController
24
  fixtures :projects,
25
           :users, :email_addresses,
26
           :roles,
27
           :members,
28
           :member_roles,
29
           :issues, :issue_statuses,
30
           :trackers,
31
           :projects_trackers,
32
           :enabled_modules,
33
           :time_entries, :enumerations,
34
           :workflows,
35
           :custom_fields, :custom_values, :custom_fields_trackers
36

  
37 24
  def test_index_should_show_visible_custom_fields_only
38 25
    prepare_test_data
39 26

  
test/functional/timelog_report_test.rb
22 22
class TimelogReportTest < Redmine::ControllerTest
23 23
  tests TimelogController
24 24

  
25
  fixtures :projects, :enabled_modules, :roles, :members, :member_roles,
26
           :email_addresses,
27
           :issues, :time_entries, :users, :trackers, :enumerations,
28
           :issue_statuses, :custom_fields, :custom_values,
29
           :projects_trackers, :custom_fields_trackers,
30
           :custom_fields_projects
31

  
32 25
  include Redmine::I18n
33 26

  
34 27
  def setup
test/functional/trackers_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class TrackersControllerTest < Redmine::ControllerTest
23
  fixtures :trackers, :projects, :projects_trackers, :users, :issues, :custom_fields, :issue_statuses, :enumerations;
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
    @request.session[:user_id] = 1 # admin
test/functional/users_controller_test.rb
22 22
class UsersControllerTest < Redmine::ControllerTest
23 23
  include Redmine::I18n
24 24

  
25
  fixtures :users, :user_preferences, :email_addresses, :projects, :members, :member_roles, :roles,
26
           :custom_fields, :custom_values, :groups_users,
27
           :auth_sources,
28
           :enabled_modules,
29
           :issues, :issue_statuses,
30
           :trackers
31

  
32 25
  def setup
33 26
    User.current = nil
34 27
    @request.session[:user_id] = 1 # admin
test/functional/versions_controller_test.rb
21 21

  
22 22
class VersionsControllerTest < Redmine::ControllerTest
23 23
  include Redmine::I18n
24
  fixtures :projects, :enabled_modules,
25
           :trackers, :projects_trackers,
26
           :versions, :issue_statuses, :issue_categories, :enumerations,
27
           :issues,
28
           :users, :email_addresses,
29
           :roles, :members, :member_roles
30

  
31 24
  def setup
32 25
    User.current = nil
33 26
  end
test/functional/versions_custom_fields_visibility_test.rb
21 21

  
22 22
class VersionsCustomFieldsVisibilityTest < Redmine::ControllerTest
23 23
  tests VersionsController
24
  fixtures :projects,
25
           :users, :email_addresses,
26
           :roles,
27
           :members,
28
           :member_roles,
29
           :issue_statuses,
30
           :trackers,
31
           :projects_trackers,
32
           :enabled_modules,
33
           :versions,
34
           :custom_fields, :custom_values, :custom_fields_trackers
35

  
36 24
  def test_show_should_display_only_custom_fields_visible_to_user
37 25
    cf1 = VersionCustomField.create!(:name => 'cf1', :field_format => 'string')
38 26
    cf2 = VersionCustomField.create!(:name => 'cf2', :field_format => 'string', :visible => false, :role_ids => [1])
test/functional/watchers_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class WatchersControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules,
24
           :issues, :trackers, :projects_trackers, :issue_statuses, :enumerations, :watchers,
25
           :boards, :messages, :wikis, :wiki_pages
26

  
27 23
  def setup
28 24
    User.current = nil
29 25
  end
test/functional/welcome_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class WelcomeControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :news, :users, :members, :roles, :member_roles, :enabled_modules
24

  
25 23
  def setup
26 24
    Setting.default_language = 'en'
27 25
    User.current = nil
test/functional/wiki_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class WikiControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles,
24
           :enabled_modules, :wikis, :wiki_pages, :wiki_contents,
25
           :wiki_content_versions, :attachments,
26
           :issues, :issue_statuses, :trackers, :watchers
27

  
28 23
  def setup
29 24
    User.current = nil
30 25
  end
test/functional/wikis_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class WikisControllerTest < Redmine::ControllerTest
23
  fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :wikis
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
  end
test/functional/workflows_controller_test.rb
20 20
require_relative '../test_helper'
21 21

  
22 22
class WorkflowsControllerTest < Redmine::ControllerTest
23
  fixtures :roles, :trackers, :workflows, :users, :issue_statuses, :custom_fields
24

  
25 23
  def setup
26 24
    User.current = nil
27 25
    @request.session[:user_id] = 1 # admin
test/helpers/activities_helper_test.rb
22 22
class ActivitiesHelperTest < Redmine::HelperTest
23 23
  include ActivitiesHelper
24 24

  
25
  fixtures :projects, :members, :users
26

  
27 25
  class MockEvent
28 26
    attr_reader :event_datetime, :event_group, :name
29 27

  
test/helpers/application_helper_test.rb
23 23
  include ERB::Util
24 24
  include AvatarsHelper
25 25

  
26
  fixtures :projects, :enabled_modules,
27
           :users, :email_addresses,
28
           :members, :member_roles, :roles,
29
           :repositories, :changesets,
30
           :projects_trackers,
31
           :trackers, :issue_statuses, :issues, :versions, :documents, :journals,
32
           :wikis, :wiki_pages, :wiki_contents,
33
           :boards, :messages, :news,
34
           :attachments, :enumerations,
35
           :custom_values, :custom_fields, :custom_fields_projects
36

  
37 26
  def setup
38 27
    super
39 28
    set_tmp_attachments_directory
test/helpers/avatars_helper_test.rb
23 23
  include ERB::Util
24 24
  include AvatarsHelper
25 25

  
26
  fixtures :users, :email_addresses
27

  
28 26
  def setup
29 27
    Setting.gravatar_enabled = '1'
30 28
  end
test/helpers/groups_helper_test.rb
24 24
  include GroupsHelper
25 25
  include AvatarsHelper
26 26

  
27
  fixtures :users
28

  
29 27
  def test_render_principals_for_new_group_users
30 28
    group = Group.generate!
31 29

  
test/helpers/icons_helper_test.rb
22 22
class IconsHelperTest < Redmine::HelperTest
23 23
  include IconsHelper
24 24

  
25
  fixtures :users
26

  
27 25
  def test_sprite_icon_should_return_svg_with_defaults
28 26
    expected = %r{<svg class="s18 icon-svg" aria-hidden="true"><use href="/assets/icons-\w+.svg#icon--edit"></use></svg>$}
29 27
    icon = sprite_icon('edit')
test/helpers/issues_helper_test.rb
24 24
  include CustomFieldsHelper
25 25
  include ERB::Util
26 26

  
27
  fixtures :projects, :trackers, :issue_statuses, :issues,
28
           :enumerations, :users, :issue_categories,
29
           :projects_trackers,
30
           :roles,
31
           :member_roles,
32
           :members,
33
           :enabled_modules,
34
           :custom_fields,
35
           :attachments,
36
           :versions, :workflows
37

  
38 27
  def test_issue_heading
39 28
    assert_equal "Bug #1", issue_heading(Issue.find(1))
40 29
  end
test/helpers/journals_helper_test.rb
22 22
class JournalsHelperTest < Redmine::HelperTest
23 23
  include JournalsHelper
24 24

  
25
  fixtures :projects, :trackers, :issue_statuses, :issues, :journals,
26
           :enumerations, :issue_categories,
... This diff was truncated because it exceeds the maximum size that can be displayed.
    (1-1/1)