Fix testunit mock errors (add super to setup methods)

pull/961/head
Michael Frister 11 years ago committed by Michael Frister
parent 48f1690a8a
commit 757867876c
  1. 2
      test/integration/api_test/disabled_rest_api_test.rb
  2. 2
      test/integration/api_test/http_accept_auth_test.rb
  3. 2
      test/integration/api_test/http_basic_login_test.rb
  4. 2
      test/integration/api_test/http_basic_login_with_api_token_test.rb
  5. 1
      test/integration/api_test/issues_test.rb
  6. 1
      test/integration/api_test/news_test.rb
  7. 1
      test/integration/api_test/projects_test.rb
  8. 1
      test/integration/api_test/time_entries_test.rb
  9. 2
      test/integration/api_test/token_authentication_test.rb
  10. 1
      test/integration/api_test/users_test.rb
  11. 2
      test/integration/lib/redmine/themes_test.rb
  12. 1
      test/unit/activity_test.rb
  13. 1
      test/unit/helpers/sort_helper_test.rb
  14. 1
      test/unit/lib/redmine/access_control_test.rb
  15. 2
      test/unit/lib/redmine/hook_test.rb
  16. 3
      test/unit/lib/redmine/notifiable_test.rb
  17. 2
      test/unit/lib/redmine/plugin_test.rb
  18. 1
      test/unit/lib/redmine/safe_attributes_test.rb
  19. 1
      test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb
  20. 1
      test/unit/lib/redmine/scm/adapters/git_adapter_test.rb
  21. 1
      test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb
  22. 3
      test/unit/lib/redmine/unified_diff_test.rb
  23. 3
      test/unit/lib/redmine/wiki_formatting/macros_test.rb
  24. 1
      test/unit/lib/redmine/wiki_formatting/null_formatter_test.rb
  25. 1
      test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb

@ -33,11 +33,13 @@ class ApiTest::DisabledRestApiTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '0'
Setting.login_required = '1'
end
def teardown
super
Setting.rest_api_enabled = '1'
Setting.login_required = '0'
end

@ -33,11 +33,13 @@ class ApiTest::HttpAcceptAuthTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
Setting.login_required = '1'
end
def teardown
super
Setting.rest_api_enabled = '0'
Setting.login_required = '0'
end

@ -33,11 +33,13 @@ class ApiTest::HttpBasicLoginTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
Setting.login_required = '1'
end
def teardown
super
Setting.rest_api_enabled = '0'
Setting.login_required = '0'
end

@ -33,11 +33,13 @@ class ApiTest::HttpBasicLoginWithApiTokenTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
Setting.login_required = '1'
end
def teardown
super
Setting.rest_api_enabled = '0'
Setting.login_required = '0'
end

@ -32,6 +32,7 @@ class ApiTest::IssuesTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
end

@ -32,6 +32,7 @@ class ApiTest::NewsTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
end

@ -32,6 +32,7 @@ class ApiTest::ProjectsTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
end

@ -32,6 +32,7 @@ class ApiTest::TimeEntriesTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
end

@ -33,11 +33,13 @@ class ApiTest::TokenAuthenticationTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
Setting.login_required = '1'
end
def teardown
super
Setting.rest_api_enabled = '0'
Setting.login_required = '0'
end

@ -32,6 +32,7 @@ class ApiTest::UsersTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
Setting.rest_api_enabled = '1'
end

@ -34,11 +34,13 @@ class ThemesTest < ActionDispatch::IntegrationTest
fixtures :all
def setup
super
@theme = OpenProject::Themes.default_theme
Setting.ui_theme = @theme.identifier
end
def teardown
super
Setting.ui_theme = nil
end

@ -45,6 +45,7 @@ class ActivityTest < ActiveSupport::TestCase
end
def teardown
super
Journal.delete_all
end

@ -32,6 +32,7 @@ class SortHelperTest < HelperTestCase
include SortHelper
def setup
super
@session = nil
@sort_param = nil
end

@ -31,6 +31,7 @@ require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::AccessControlTest < ActiveSupport::TestCase
def setup
super
@access_module = Redmine::AccessControl
end

@ -69,10 +69,12 @@ class Redmine::Hook::ManagerTest < ActionView::TestCase
Redmine::Hook.clear_listeners
def setup
super
@hook_module = Redmine::Hook
end
def teardown
super
@hook_module.clear_listeners
end

@ -29,9 +29,6 @@
require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::NotifiableTest < ActiveSupport::TestCase
def setup
end
def test_all
assert_equal 11, Redmine::Notifiable.all.length

@ -31,12 +31,14 @@ require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::PluginTest < ActiveSupport::TestCase
def setup
super
@klass = Redmine::Plugin
# In case some real plugins are installed
@klass.clear
end
def teardown
super
@klass.clear
end

@ -57,6 +57,7 @@ class Redmine::SafeAttributesTest < ActiveSupport::TestCase
end
def setup
super
@admin = User.find_by_login("admin") || FactoryGirl.create(:admin)
@anonymous = User.anonymous || FactoryGirl.create(:anonymous)
end

@ -36,6 +36,7 @@ class FilesystemAdapterTest < ActiveSupport::TestCase
if File.directory?(REPOSITORY_PATH)
def setup
super
@adapter = Redmine::Scm::Adapters::FilesystemAdapter.new(REPOSITORY_PATH)
end

@ -47,6 +47,7 @@ class GitAdapterTest < ActiveSupport::TestCase
if File.directory?(REPOSITORY_PATH)
def setup
super
@adapter = Redmine::Scm::Adapters::GitAdapter.new(
REPOSITORY_PATH,
nil,

@ -33,6 +33,7 @@ class SubversionAdapterTest < ActiveSupport::TestCase
if repository_configured?('subversion')
def setup
super
@adapter = Redmine::Scm::Adapters::SubversionAdapter.new(self.class.subversion_repository_url)
end

@ -31,9 +31,6 @@ require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::UnifiedDiffTest < ActiveSupport::TestCase
def setup
end
def test_subversion_diff
diff = Redmine::UnifiedDiff.new(read_diff_fixture('subversion.diff'))
# number of files

@ -43,9 +43,6 @@ class Redmine::WikiFormatting::MacrosTest < HelperTestCase
@project = nil
end
def teardown
end
def test_macro_hello_world
text = "{{hello_world}}"
assert textilizable(text).match(/Hello world!/)

@ -32,6 +32,7 @@ require File.expand_path('../../../../../test_helper', __FILE__)
class Redmine::WikiFormatting::NullFormatterTest < HelperTestCase
def setup
super
@formatter = Redmine::WikiFormatting::NullFormatter::Formatter
end

@ -32,6 +32,7 @@ require File.expand_path('../../../../../test_helper', __FILE__)
class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase
def setup
super
@formatter = Redmine::WikiFormatting::Textile::Formatter
end

Loading…
Cancel
Save