attempt to fix a constant not defined error when executing mysql unit tests

pull/69/head
Philipp Tessenow 12 years ago
parent 387db29f7c
commit f24dc2f4f1
  1. 1
      test/functional/admin_controller_test.rb
  2. 1
      test/functional/application_controller_test.rb
  3. 1
      test/functional/attachments_controller_test.rb
  4. 1
      test/functional/auth_sources_controller_test.rb
  5. 1
      test/functional/boards_controller_test.rb
  6. 1
      test/functional/custom_fields_controller_test.rb
  7. 1
      test/functional/documents_controller_test.rb
  8. 1
      test/functional/enumerations_controller_test.rb
  9. 1
      test/functional/files_controller_test.rb
  10. 1
      test/functional/groups_controller_test.rb
  11. 1
      test/functional/issue_categories_controller_test.rb
  12. 1
      test/functional/issue_relations_controller_test.rb
  13. 1
      test/functional/issues/moves_controller_test.rb
  14. 1
      test/functional/issues/reports_controller_test.rb
  15. 1
      test/functional/issues_controller_test.rb
  16. 1
      test/functional/issues_controller_transaction_test.rb
  17. 1
      test/functional/journals_controller_test.rb
  18. 1
      test/functional/ldap_auth_sources_controller_test.rb
  19. 1
      test/functional/mail_handler_controller_test.rb
  20. 1
      test/functional/members_controller_test.rb
  21. 1
      test/functional/messages_controller_test.rb
  22. 1
      test/functional/my_controller_test.rb
  23. 1
      test/functional/news/comments_controller_test.rb
  24. 1
      test/functional/news_controller_test.rb
  25. 1
      test/functional/project_enumerations_controller_test.rb
  26. 1
      test/functional/projects_controller_test.rb
  27. 1
      test/functional/queries_controller_test.rb
  28. 1
      test/functional/repositories_controller_test.rb
  29. 1
      test/functional/repositories_filesystem_controller_test.rb
  30. 1
      test/functional/repositories_git_controller_test.rb
  31. 1
      test/functional/repositories_subversion_controller_test.rb
  32. 1
      test/functional/roles_controller_test.rb
  33. 1
      test/functional/search_controller_test.rb
  34. 1
      test/functional/settings_controller_test.rb
  35. 1
      test/functional/sys_controller_test.rb
  36. 1
      test/functional/timelog_controller_test.rb
  37. 1
      test/functional/trackers_controller_test.rb
  38. 3
      test/functional/user_mailer_test.rb
  39. 1
      test/functional/users_controller_test.rb
  40. 1
      test/functional/versions_controller_test.rb
  41. 1
      test/functional/watchers_controller_test.rb
  42. 1
      test/functional/welcome_controller_test.rb
  43. 1
      test/functional/wiki_controller_test.rb
  44. 1
      test/functional/wikis_controller_test.rb
  45. 1
      test/functional/workflows_controller_test.rb
  46. 4
      test/test_helper.rb

@ -21,6 +21,7 @@ class AdminControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = AdminController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class ApplicationControllerTest < ActionController::TestCase
include Redmine::I18n
def setup
super
@controller = ApplicationController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -23,6 +23,7 @@ class AttachmentsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = AttachmentsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -18,6 +18,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@request.session[:user_id] = 1
end

@ -21,6 +21,7 @@ class BoardsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = BoardsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -22,6 +22,7 @@ class CustomFieldsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = CustomFieldsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class DocumentsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = DocumentsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class EnumerationsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = EnumerationsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -18,6 +18,7 @@ class FilesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = FilesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class GroupsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = GroupsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class IssueCategoriesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = IssueCategoriesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -23,6 +23,7 @@ class IssueRelationsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = IssueRelationsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -18,6 +18,7 @@ class Issues::MovesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
User.current = nil
end

@ -22,6 +22,7 @@ class Issues::ReportsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = Issues::ReportsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class IssuesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = IssuesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -23,6 +23,7 @@ class IssuesControllerTransactionTest < ActionController::TestCase
self.use_transactional_fixtures = false
def setup
super
@controller = IssuesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class JournalsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = JournalsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -18,6 +18,7 @@ class LdapAuthSourcesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@request.session[:user_id] = 1
end

@ -23,6 +23,7 @@ class MailHandlerControllerTest < ActionController::TestCase
FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures/mail_handler'
def setup
super
@controller = MailHandlerController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -22,6 +22,7 @@ class MembersControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = MembersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class MessagesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = MessagesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class MyControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = MyController.new
@request = ActionController::TestRequest.new
@request.session[:user_id] = 2

@ -17,6 +17,7 @@ class News::CommentsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
User.current = nil
end

@ -21,6 +21,7 @@ class NewsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = NewsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -18,6 +18,7 @@ class ProjectEnumerationsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@request.session[:user_id] = nil
Setting.default_language = 'en'
end

@ -23,6 +23,7 @@ class ProjectsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = ProjectsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class QueriesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = QueriesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class RepositoriesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = RepositoriesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -25,6 +25,7 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
PRJ_ID = 3
def setup
super
@controller = RepositoriesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -25,6 +25,7 @@ class RepositoriesGitControllerTest < ActionController::TestCase
REPOSITORY_PATH.gsub!(/\//, "\\") if Redmine::Platform.mswin?
def setup
super
@controller = RepositoriesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -23,6 +23,7 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
PRJ_ID = 3
def setup
super
@controller = RepositoriesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class RolesControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = RolesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -22,6 +22,7 @@ class SearchControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = SearchController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -22,6 +22,7 @@ class SettingsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = SettingsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -23,6 +23,7 @@ class SysControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = SysController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -22,6 +22,7 @@ class TimelogControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = TimelogController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class TrackersControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = TrackersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -3,7 +3,8 @@ require File.expand_path('../../test_helper', __FILE__)
class UserMailerTest < ActionMailer::TestCase
include ActionDispatch::Assertions::SelectorAssertions
setup do
def setup
super
Setting.mail_from = 'john@doe.com'
Setting.host_name = 'mydomain.foo'
Setting.protocol = 'http'

@ -24,6 +24,7 @@ class UsersControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = UsersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -22,6 +22,7 @@ class VersionsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = VersionsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class WatchersControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = WatchersController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class WelcomeControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = WelcomeController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class WikiControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = WikiController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class WikisControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = WikisController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -21,6 +21,7 @@ class WorkflowsControllerTest < ActionController::TestCase
fixtures :all
def setup
super
@controller = WorkflowsController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

@ -65,7 +65,9 @@ class ActiveSupport::TestCase
# Ugly H4X to convince postgresql to update its sequences after bulk loading fixtures
# TODO: remove this when we got rid of the fixtures
ActiveRecord::Base.descendants.each do |model|
if model.table_name and ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
if model.table_name \
and defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) \
and ActiveRecord::Base.connection.is_a?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter)
ActiveRecord::Base.connection.reset_pk_sequence!(model.table_name)
end
end

Loading…
Cancel
Save