Added Messenger plugin.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require File.expand_path '../../test_helper', __FILE__
|
||||
|
||||
class CommonViewsTest < Redmine::IntegrationTest
|
||||
fixtures :projects,
|
||||
:users,
|
||||
:roles,
|
||||
:members,
|
||||
:member_roles,
|
||||
:trackers,
|
||||
:projects_trackers,
|
||||
:enabled_modules,
|
||||
:issue_statuses,
|
||||
:issues,
|
||||
:enumerations,
|
||||
:custom_fields,
|
||||
:custom_values,
|
||||
:custom_fields_trackers
|
||||
|
||||
def setup
|
||||
RedmineMessenger::TestCase.prepare
|
||||
end
|
||||
|
||||
test 'View user' do
|
||||
log_user 'admin', 'admin'
|
||||
get '/users/2'
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test 'View issue' do
|
||||
log_user 'admin', 'admin'
|
||||
EnabledModule.create project_id: 1, name: 'issue_tracking'
|
||||
issue = Issue.where(id: 1).first
|
||||
issue.save
|
||||
get '/issues/1'
|
||||
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
10
plugins/redmine_messenger/test/integration/routing_test.rb
Normal file
10
plugins/redmine_messenger/test/integration/routing_test.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require File.expand_path '../../test_helper', __FILE__
|
||||
|
||||
class RoutingTest < Redmine::RoutingTest
|
||||
test 'routing messenger' do
|
||||
should_route 'GET /projects/1/settings/messenger' => 'projects#settings', id: '1', tab: 'messenger'
|
||||
should_route 'PUT /projects/1/messenger_setting' => 'messenger_settings#update', project_id: '1'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user