Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -19,7 +21,7 @@ require File.expand_path('../../test_helper', __FILE__)
|
|||
|
||||
class SettingsControllerTest < Redmine::ControllerTest
|
||||
fixtures :projects, :trackers, :issue_statuses, :issues,
|
||||
:users
|
||||
:users, :email_addresses
|
||||
|
||||
def setup
|
||||
User.current = nil
|
||||
|
@ -194,11 +196,11 @@ class SettingsControllerTest < Redmine::ControllerTest
|
|||
assert_nil (mail = ActionMailer::Base.deliveries.last)
|
||||
end
|
||||
|
||||
|
||||
def test_get_plugin_settings
|
||||
ActionController::Base.append_view_path(File.join(Rails.root, "test/fixtures/plugins"))
|
||||
Redmine::Plugin.register :foo do
|
||||
settings :partial => "foo_plugin/foo_plugin_settings"
|
||||
directory 'test/fixtures/plugins/foo_plugin'
|
||||
end
|
||||
Setting.plugin_foo = {'sample_setting' => 'Plugin setting value'}
|
||||
|
||||
|
@ -218,7 +220,9 @@ class SettingsControllerTest < Redmine::ControllerTest
|
|||
end
|
||||
|
||||
def test_get_non_configurable_plugin_settings
|
||||
Redmine::Plugin.register(:foo) {}
|
||||
Redmine::Plugin.register(:foo) do
|
||||
directory 'test/fixtures/plugins/foo_plugin'
|
||||
end
|
||||
|
||||
get :plugin, :params => {:id => 'foo'}
|
||||
assert_response 404
|
||||
|
@ -231,6 +235,7 @@ class SettingsControllerTest < Redmine::ControllerTest
|
|||
Redmine::Plugin.register(:foo) do
|
||||
settings :partial => 'not blank', # so that configurable? is true
|
||||
:default => {'sample_setting' => 'Plugin setting value'}
|
||||
directory 'test/fixtures/plugins/foo_plugin'
|
||||
end
|
||||
|
||||
post :plugin, :params => {
|
||||
|
@ -246,6 +251,7 @@ class SettingsControllerTest < Redmine::ControllerTest
|
|||
Redmine::Plugin.register(:foo) do
|
||||
settings :partial => 'not blank', # so that configurable? is true
|
||||
:default => {'sample_setting' => 'Plugin setting value'}
|
||||
directory 'test/fixtures/plugins/foo_plugin'
|
||||
end
|
||||
|
||||
post :plugin, :params => {
|
||||
|
@ -257,7 +263,9 @@ class SettingsControllerTest < Redmine::ControllerTest
|
|||
end
|
||||
|
||||
def test_post_non_configurable_plugin_settings
|
||||
Redmine::Plugin.register(:foo) {}
|
||||
Redmine::Plugin.register(:foo) do
|
||||
directory 'test/fixtures/plugins/foo_plugin'
|
||||
end
|
||||
|
||||
post :plugin, :params => {
|
||||
:id => 'foo',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue