@ -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
Setting.rest_api_enabled = '1'
Setting.login_required = '0'
@ -33,11 +33,13 @@ class ApiTest::HttpAcceptAuthTest < ActionDispatch::IntegrationTest
@ -33,11 +33,13 @@ class ApiTest::HttpBasicLoginTest < ActionDispatch::IntegrationTest
@ -33,11 +33,13 @@ class ApiTest::HttpBasicLoginWithApiTokenTest < ActionDispatch::IntegrationTest
@ -32,6 +32,7 @@ class ApiTest::IssuesTest < ActionDispatch::IntegrationTest
@ -32,6 +32,7 @@ class ApiTest::NewsTest < ActionDispatch::IntegrationTest
@ -32,6 +32,7 @@ class ApiTest::ProjectsTest < ActionDispatch::IntegrationTest
@ -32,6 +32,7 @@ class ApiTest::TimeEntriesTest < ActionDispatch::IntegrationTest
@ -33,11 +33,13 @@ class ApiTest::TokenAuthenticationTest < ActionDispatch::IntegrationTest
@ -32,6 +32,7 @@ class ApiTest::UsersTest < ActionDispatch::IntegrationTest
@ -34,11 +34,13 @@ class ThemesTest < ActionDispatch::IntegrationTest
@theme = OpenProject::Themes.default_theme
Setting.ui_theme = @theme.identifier
Setting.ui_theme = nil
@ -45,6 +45,7 @@ class ActivityTest < ActiveSupport::TestCase
Journal.delete_all
@ -32,6 +32,7 @@ class SortHelperTest < HelperTestCase
include SortHelper
@session = nil
@sort_param = nil
@ -31,6 +31,7 @@ require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::AccessControlTest < ActiveSupport::TestCase
@access_module = Redmine::AccessControl
@ -69,10 +69,12 @@ class Redmine::Hook::ManagerTest < ActionView::TestCase
Redmine::Hook.clear_listeners
@hook_module = Redmine::Hook
@hook_module.clear_listeners
@ -29,9 +29,6 @@
require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::NotifiableTest < ActiveSupport::TestCase
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
@klass = Redmine::Plugin
# In case some real plugins are installed
@klass.clear
@ -57,6 +57,7 @@ class Redmine::SafeAttributesTest < ActiveSupport::TestCase
@admin = User.find_by_login("admin") || FactoryGirl.create(:admin)
@anonymous = User.anonymous || FactoryGirl.create(:anonymous)
@ -36,6 +36,7 @@ class FilesystemAdapterTest < ActiveSupport::TestCase
if File.directory?(REPOSITORY_PATH)
@adapter = Redmine::Scm::Adapters::FilesystemAdapter.new(REPOSITORY_PATH)
@ -47,6 +47,7 @@ class GitAdapterTest < ActiveSupport::TestCase
@adapter = Redmine::Scm::Adapters::GitAdapter.new(
REPOSITORY_PATH,
nil,
@ -33,6 +33,7 @@ class SubversionAdapterTest < ActiveSupport::TestCase
if repository_configured?('subversion')
@adapter = Redmine::Scm::Adapters::SubversionAdapter.new(self.class.subversion_repository_url)
@ -31,9 +31,6 @@ require File.expand_path('../../../../test_helper', __FILE__)
class Redmine::UnifiedDiffTest < ActiveSupport::TestCase
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
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
@formatter = Redmine::WikiFormatting::NullFormatter::Formatter
class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase
@formatter = Redmine::WikiFormatting::Textile::Formatter