Rubocop tests

This commit is contained in:
Karel Pičman 2023-04-14 09:52:49 +02:00
parent 042761b6e0
commit 3e432ecd6d
22 changed files with 28 additions and 28 deletions

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Attachment controller patch test
class AttachmentsControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Custom workflows controller test
class CustomWorkflowsControllerTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Group controller patch test
class GroupControllerPatchTest < RedmineCustomWorkflows::Test::TestCase
@ -40,10 +40,10 @@ class GroupControllerPatchTest < RedmineCustomWorkflows::Test::TestCase
assert_equal 'Custom workflow', @controller.flash[:notice]
end
# def test_cw_env
# @request.headers['Referer'] = edit_group_path(id: @group10.id)
# put :update, params: { id: @group10.id, group: { name: 'Updated name' } }
# assert_redirected_to edit_group_path(id: @group10.id)
# assert_equal request.remote_ip, @controller.flash[:warning]
# end
def test_cw_env
@request.headers['Referer'] = edit_group_path(id: @group10.id)
put :update, params: { id: @group10.id, group: { name: 'Updated name' } }
assert_redirected_to edit_group_path(id: @group10.id)
assert_equal request.remote_ip, @controller.flash[:warning]
end
end

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Issue relation controller patch test
class IssueRelationsControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Issue controller patch test
class IssuesControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Project controller patch test
class ProjectsControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Time controller patch test
class TimelogControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Users controller patch test
class UsersControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Version controller patch test
class VersionsControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -18,7 +18,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Wiki controller patch test
class WikiControllerPatchTest < RedmineCustomWorkflows::Test::TestCase

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Attachment patch test class
class AttachmentPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Custom mailer test class
class CustomWorkflowMailerTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Custom workflow test class
class CustomWorkflowTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Group patch test class
class GroupPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Issue patch test class
class IssuePatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Issue relation patch test class
class IssueRelationPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Project patch test class
class ProjectPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Time entry patch test class
class TimeEntryPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# user patch test class
class UserPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Version patch test class
class VersionPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Wiki content patch test class
class WikiContentPatchTest < RedmineCustomWorkflows::Test::UnitTest

View File

@ -19,7 +19,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.expand_path('../test_helper', __dir__)
require File.expand_path('../../test_helper', __FILE__)
# Wiki page test class
class WikiPagePatchTest < RedmineCustomWorkflows::Test::UnitTest