Applied rubocop suggestions.
This commit is contained in:
parent
e7fe3f827f
commit
2b6b268eb9
27 changed files with 27 additions and 27 deletions
|
@ -3,7 +3,7 @@
|
|||
require 'browser_test_helper'
|
||||
|
||||
class IntegrationCtiTest < TestCase
|
||||
setup do
|
||||
before do
|
||||
if !ENV['CTI_TOKEN']
|
||||
raise "ERROR: Need CTI_TOKEN - hint CTI_TOKEN='some_token'"
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ class TestCase < ActiveSupport::TestCase
|
|||
|
||||
DEBUG = true
|
||||
|
||||
setup do
|
||||
before do
|
||||
# print current test case to STDOUT
|
||||
# for status reasoning and debugging purposes
|
||||
source_location = self.class.instance_method(method_name).source_location
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'test_helper'
|
|||
class ElasticsearchActiveTest < ActiveSupport::TestCase
|
||||
include SearchindexHelper
|
||||
|
||||
setup do
|
||||
before do
|
||||
|
||||
configure_elasticsearch(required: true)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'test_helper'
|
|||
class ElasticsearchTest < ActiveSupport::TestCase
|
||||
include SearchindexHelper
|
||||
|
||||
setup do
|
||||
before do
|
||||
|
||||
configure_elasticsearch(required: true)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
require 'net/imap'
|
||||
|
||||
class EmailKeepOnServerTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
before do
|
||||
|
||||
if ENV['KEEP_ON_MAIL_SERVER'].blank?
|
||||
raise "Need KEEP_ON_MAIL_SERVER as ENV variable like export KEEP_ON_MAIL_SERVER='mx.example.com'"
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'net/imap'
|
|||
|
||||
class EmailPostmasterToSender < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('postmaster_max_size', 0.1)
|
||||
|
||||
@test_id = rand(999_999_999)
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'webmock/minitest'
|
|||
|
||||
class GeoLocationTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
@mock = true
|
||||
#WebMock.allow_net_connect!
|
||||
end
|
||||
|
|
|
@ -5,7 +5,7 @@ require 'integration_test_helper'
|
|||
class ReportTest < ActiveSupport::TestCase
|
||||
include SearchindexHelper
|
||||
|
||||
setup do
|
||||
before do
|
||||
|
||||
# create attribute
|
||||
ObjectManager::Attribute.add(
|
||||
|
|
|
@ -6,7 +6,7 @@ class UserAgentTest < ActiveSupport::TestCase
|
|||
host = 'https://web-test.dc.zammad.com'
|
||||
#host = 'http://127.0.0.1:3003'
|
||||
|
||||
setup do
|
||||
before do
|
||||
if ENV['ZAMMAD_PROXY_TEST'] == 'true'
|
||||
Setting.set('proxy', ENV['ZAMMAD_PROXY'])
|
||||
Setting.set('proxy_username', ENV['ZAMMAD_PROXY_USERNAME'])
|
||||
|
|
|
@ -25,7 +25,7 @@ class ActiveSupport::TestCase
|
|||
# set system mode to done / to activate
|
||||
Setting.set('system_init_done', true)
|
||||
|
||||
setup do
|
||||
before do
|
||||
|
||||
# clear cache
|
||||
Cache.clear
|
||||
|
|
|
@ -22,7 +22,7 @@ class ActiveSupport::TestCase
|
|||
# set system mode to done / to activate
|
||||
Setting.set('system_init_done', true)
|
||||
|
||||
setup do
|
||||
before do
|
||||
|
||||
# exit all threads
|
||||
Thread.list.each do |thread|
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class ActivityStreamTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
roles = Role.where(name: %w[Admin Agent])
|
||||
groups = Group.where(name: 'Users')
|
||||
@admin_user = User.create_or_update(
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class ChatTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
groups = Group.all
|
||||
roles = Role.where(name: %w[Agent])
|
||||
@agent1 = User.create!(
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class EmailProcessSenderIsSystemAddressOrAgent < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
EmailAddress.create_or_update(
|
||||
channel_id: 1,
|
||||
realname: 'My System',
|
||||
|
|
|
@ -9,7 +9,7 @@ class IntegrationIcingaTest < ActiveSupport::TestCase
|
|||
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#host-states
|
||||
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#service-states
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('icinga_integration', true)
|
||||
Setting.set('icinga_sender', 'icinga2@monitoring.example.com')
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ class IntegrationMonitTest < ActiveSupport::TestCase
|
|||
# according
|
||||
# https://mmonit.com/monit/documentation/#ALERT-MESSAGES
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('monit_integration', true)
|
||||
Setting.set('monit_sender', 'monit@monitoring.example.com')
|
||||
end
|
||||
|
|
|
@ -7,7 +7,7 @@ class IntegrationNagiosTest < ActiveSupport::TestCase
|
|||
# according
|
||||
# https://github.com/NagiosEnterprises/nagioscore/blob/754218e67653929a58938b99ef6b6039b6474fe4/sample-config/template-object/commands.cfg.in#L35
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('nagios_integration', true)
|
||||
Setting.set('nagios_sender', 'nagios2@monitoring.example.com')
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class OnlineNotificationTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
role = Role.lookup(name: 'Agent')
|
||||
@group = Group.create_or_update(
|
||||
name: 'OnlineNotificationTest',
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketLastOwnerUpdateTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
Group.create_or_update(
|
||||
name: 'LastOwnerUpdate',
|
||||
email_address: EmailAddress.first,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
require 'test_helper'
|
||||
|
||||
class TicketNotificationTest < ActiveSupport::TestCase
|
||||
setup do
|
||||
before do
|
||||
Setting.set('timezone_default', 'Europe/Berlin')
|
||||
Trigger.create_or_update(
|
||||
name: 'auto reply - new ticket',
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketOverviewOutOfOfficeTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
group = Group.create_or_update(
|
||||
name: 'OverviewReplacementTest',
|
||||
updated_at: '2015-02-05 16:37:00',
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketOverviewTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
group = Group.create_or_update(
|
||||
name: 'OverviewTest',
|
||||
updated_at: '2015-02-05 16:37:00',
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketSelectorTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
@group = Group.create_or_update(
|
||||
name: 'SelectorTest',
|
||||
updated_at: '2015-02-05 16:37:00',
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
Ticket.destroy_all
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketTriggerExtendedTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('ticket_trigger_recursive', true)
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('ticket_trigger_recursive', false)
|
||||
end
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ require 'test_helper'
|
|||
|
||||
class TicketTriggerTest < ActiveSupport::TestCase
|
||||
|
||||
setup do
|
||||
before do
|
||||
Setting.set('ticket_trigger_recursive', true)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue