diff --git a/.rubocop/default.yml b/.rubocop/default.yml index 49e5cb767..9b5874d37 100644 --- a/.rubocop/default.yml +++ b/.rubocop/default.yml @@ -81,11 +81,6 @@ Style/RescueStandardError: Enabled: true EnforcedStyle: implicit -Layout/LeadingCommentSpace: - Description: 'Comments should start with a space.' - StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-space' - Enabled: false - Layout/SpaceInsideReferenceBrackets: Description: 'Checks the spacing inside referential brackets.' Enabled: false diff --git a/app/controllers/application_controller/authenticates.rb b/app/controllers/application_controller/authenticates.rb index ce0b0b01b..277414b6e 100644 --- a/app/controllers/application_controller/authenticates.rb +++ b/app/controllers/application_controller/authenticates.rb @@ -43,10 +43,10 @@ module ApplicationController::Authenticates end def authentication_check_only(auth_param = {}) - #logger.debug 'authentication_check' - #logger.debug params.inspect - #logger.debug session.inspect - #logger.debug cookies.inspect + # logger.debug 'authentication_check' + # logger.debug params.inspect + # logger.debug session.inspect + # logger.debug cookies.inspect authentication_errors = [] # already logged in, early exit diff --git a/app/controllers/application_controller/has_user.rb b/app/controllers/application_controller/has_user.rb index 8299ea62e..2a880dc8f 100644 --- a/app/controllers/application_controller/has_user.rb +++ b/app/controllers/application_controller/has_user.rb @@ -88,7 +88,7 @@ module ApplicationController::HasUser # update session updated_at def session_update - #sleep 0.6 + # sleep 0.6 session[:ping] = Time.zone.now.iso8601 diff --git a/app/controllers/first_steps_controller.rb b/app/controllers/first_steps_controller.rb index c83357587..94072efd5 100644 --- a/app/controllers/first_steps_controller.rb +++ b/app/controllers/first_steps_controller.rb @@ -7,13 +7,13 @@ class FirstStepsController < ApplicationController def index invite_agents = false - #if User.of_role('Agent').count > 2 + # if User.of_role('Agent').count > 2 # invite_agents = true - #end + # end invite_customers = false - #if User.of_role('Customer').count > 2 + # if User.of_role('Customer').count > 2 # invite_customers = true - #end + # end chat_active = false if Setting.get('chat') @@ -98,11 +98,11 @@ class FirstStepsController < ApplicationController checked: macro_active, location: '#manage/macros', }, - #{ + # { # name: 'Create Overviews', # checked: false, # location: '#manage/overviews', - #}, + # }, ], }, { diff --git a/app/controllers/getting_started_controller.rb b/app/controllers/getting_started_controller.rb index 4fdd67d70..e0a870ad2 100644 --- a/app/controllers/getting_started_controller.rb +++ b/app/controllers/getting_started_controller.rb @@ -211,7 +211,7 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password} end def setup_done - #return false + # return false count = User.all.count() done = true if count <= 2 diff --git a/app/controllers/long_polling_controller.rb b/app/controllers/long_polling_controller.rb index 74af327c1..5aa4a5ab5 100644 --- a/app/controllers/long_polling_controller.rb +++ b/app/controllers/long_polling_controller.rb @@ -64,7 +64,7 @@ class LongPollingController < ApplicationController 4.times do sleep 0.25 end - #sleep 1 + # sleep 1 Sessions.touch(client_id) # rubocop:disable Rails/SkipsModelValidations # set max loop time to 24 sec. because of 30 sec. timeout of mod_proxy @@ -83,7 +83,7 @@ class LongPollingController < ApplicationController 8.times do sleep 0.25 end - #sleep 2 + # sleep 2 if count.zero? render json: { event: 'pong' } return diff --git a/app/jobs/application_job/has_delayed_job_monitoring_compatibilty.rb b/app/jobs/application_job/has_delayed_job_monitoring_compatibilty.rb index 933daf3df..3872aa278 100644 --- a/app/jobs/application_job/has_delayed_job_monitoring_compatibilty.rb +++ b/app/jobs/application_job/has_delayed_job_monitoring_compatibilty.rb @@ -11,7 +11,7 @@ class ApplicationJob # until we resolve this dependency. after_enqueue do |job| # skip update of `attempts` attribute if job wasn't queued because of ActiveJobLock - #(another job with same lock key got queued before this job could be retried) + # (another job with same lock key got queued before this job could be retried) next if job.provider_job_id.blank? # update the column right away without loading Delayed::Job record diff --git a/app/jobs/communicate_telegram_job.rb b/app/jobs/communicate_telegram_job.rb index 81044ff07..5ecf5527b 100644 --- a/app/jobs/communicate_telegram_job.rb +++ b/app/jobs/communicate_telegram_job.rb @@ -24,7 +24,7 @@ class CommunicateTelegramJob < ApplicationJob channel = Channel.lookup(id: ticket.preferences['channel_id']) end log_error(article, "No such channel for bot #{ticket.preferences['bid']} or channel id #{ticket.preferences['channel_id']}") if !channel - #log_error(article, "Channel.find(#{channel.id}) isn't a telegram channel!") if channel.options[:adapter] !~ /\Atelegram/i + # log_error(article, "Channel.find(#{channel.id}) isn't a telegram channel!") if channel.options[:adapter] !~ /\Atelegram/i log_error(article, "Channel.find(#{channel.id}) has not telegram api token!") if channel.options[:api_token].blank? begin diff --git a/app/models/calendar.rb b/app/models/calendar.rb index c3ed16db0..24ef0497e 100644 --- a/app/models/calendar.rb +++ b/app/models/calendar.rb @@ -423,7 +423,7 @@ returns return end - #raise Exceptions::UnprocessableEntity, 'No configured business hours found!' if hours.blank? + # raise Exceptions::UnprocessableEntity, 'No configured business hours found!' if hours.blank? # validate if business hours are usable by execute a try calculation begin diff --git a/app/models/channel.rb b/app/models/channel.rb index 9beb070a2..add038196 100644 --- a/app/models/channel.rb +++ b/app/models/channel.rb @@ -174,7 +174,7 @@ stream all accounts end end - #logger.info "thread stream for channel (#{channel.id}) already running" if @@channel_stream[channel_id].present? + # logger.info "thread stream for channel (#{channel.id}) already running" if @@channel_stream[channel_id].present? next if @@channel_stream[channel_id].present? @@channel_stream[channel_id] = { diff --git a/app/models/channel/driver/pop3.rb b/app/models/channel/driver/pop3.rb index 37a2b4e18..469475f59 100644 --- a/app/models/channel/driver/pop3.rb +++ b/app/models/channel/driver/pop3.rb @@ -63,7 +63,7 @@ returns Rails.logger.info "fetching pop3 (#{options[:host]}/#{options[:user]} port=#{port},ssl=#{ssl})" @pop = ::Net::POP3.new(options[:host], port) - #@pop.set_debug_output $stderr + # @pop.set_debug_output $stderr # on check, reduce open_timeout to have faster probing @pop.open_timeout = 16 diff --git a/app/models/concerns/has_history.rb b/app/models/concerns/has_history.rb index edf0d2851..512e2c0c7 100644 --- a/app/models/concerns/has_history.rb +++ b/app/models/concerns/has_history.rb @@ -47,7 +47,7 @@ log object update history with all updated attributes, if configured - will be e end end self.history_changes_last_done = changes - #logger.info 'updated ' + self.changes.inspect + # logger.info 'updated ' + self.changes.inspect return if changes['id'] && !changes['id'][0] @@ -101,7 +101,7 @@ log object update history with all updated attributes, if configured - will be e id_from: value_id[0], id_to: value_id[1], } - #logger.info "HIST NEW #{self.class.to_s}.find(#{self.id}) #{data.inspect}" + # logger.info "HIST NEW #{self.class.to_s}.find(#{self.id}) #{data.inspect}" history_log('updated', updated_by_id, data) end end diff --git a/app/models/setting.rb b/app/models/setting.rb index 8b4c46efd..63981d60e 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -159,17 +159,17 @@ reload config settings # check if cache is still valid def self.cache_valid? if @@lookup_at && @@lookup_at > Time.now.to_i - @@lookup_timeout - #logger.debug "Setting.cache_valid?: cache_id has been set within last #{@@lookup_timeout} seconds" + # logger.debug "Setting.cache_valid?: cache_id has been set within last #{@@lookup_timeout} seconds" return true end change_id = Cache.read('Setting::ChangeId') if @@change_id && change_id == @@change_id @@lookup_at = Time.now.to_i # rubocop:disable Style/ClassVars - #logger.debug "Setting.cache_valid?: cache still valid, #{@@change_id}/#{change_id}" + # logger.debug "Setting.cache_valid?: cache still valid, #{@@change_id}/#{change_id}" return true end - #logger.debug "Setting.cache_valid?: cache has changed, #{@@change_id}/#{change_id}" + # logger.debug "Setting.cache_valid?: cache has changed, #{@@change_id}/#{change_id}" false end private_class_method :cache_valid? diff --git a/app/models/text_module.rb b/app/models/text_module.rb index d2bc7563a..2b20f79bc 100644 --- a/app/models/text_module.rb +++ b/app/models/text_module.rb @@ -72,7 +72,7 @@ push text_modules to online def self.push(locale) # only push changed text_modules - text_modules = TextModule.all #where(locale: locale) + text_modules = TextModule.all # where(locale: locale) text_modules_to_push = [] text_modules.each do |text_module| next if !text_module.active diff --git a/app/models/transaction/slack.rb b/app/models/transaction/slack.rb index 1d22a95b3..a988e6c13 100644 --- a/app/models/transaction/slack.rb +++ b/app/models/transaction/slack.rb @@ -210,7 +210,7 @@ class Transaction::Slack # only show allowed attributes attribute_list = ObjectManager::Object.new('Ticket').attributes(user).index_by { |item| item[:name] } - #puts "AL #{attribute_list.inspect}" + # puts "AL #{attribute_list.inspect}" user_related_changes = {} @item[:changes].each do |key, value| diff --git a/app/models/translation.rb b/app/models/translation.rb index 62f0c206c..e5daad546 100644 --- a/app/models/translation.rb +++ b/app/models/translation.rb @@ -175,7 +175,7 @@ get list of translations presorted_list.push item list.delete item - #list.unshift presort + # list.unshift presort end end data['list'] = presorted_list.concat list diff --git a/db/migrate/20120101000001_create_base.rb b/db/migrate/20120101000001_create_base.rb index 6b6112929..bb88f51bf 100644 --- a/db/migrate/20120101000001_create_base.rb +++ b/db/migrate/20120101000001_create_base.rb @@ -53,7 +53,7 @@ class CreateBase < ActiveRecord::Migration[4.2] end add_index :users, [:login], unique: true add_index :users, [:email] - #add_index :users, [:email], unique: => true + # add_index :users, [:email], unique: => true add_index :users, [:organization_id] add_index :users, [:image] add_index :users, [:department] diff --git a/db/seeds/settings.rb b/db/seeds/settings.rb index 23f137a1d..6f3a6a26c 100644 --- a/db/seeds/settings.rb +++ b/db/seeds/settings.rb @@ -845,7 +845,7 @@ Setting.create_if_not_exists( description: 'Set notes for ticket create types by selecting type.', options: {}, state: { - #'email-out' => 'Attention: When creating a ticket an e-mail is sent.', + # 'email-out' => 'Attention: When creating a ticket an e-mail is sent.', }, preferences: { permission: ['admin.ui'], diff --git a/lib/can_be_published/state_machine.rb b/lib/can_be_published/state_machine.rb index 6ef5bfe3a..0a34a0d43 100644 --- a/lib/can_be_published/state_machine.rb +++ b/lib/can_be_published/state_machine.rb @@ -59,7 +59,7 @@ module CanBePublished state :internal state :published state :archived - state :unarchived #magic + state :unarchived # magic event :internal do transitions from: :draft, diff --git a/lib/core_ext/string.rb b/lib/core_ext/string.rb index bb9cc2020..053d9f035 100644 --- a/lib/core_ext/string.rb +++ b/lib/core_ext/string.rb @@ -441,7 +441,7 @@ class String # word 14 # edv hotline wrote: # edv hotline schrieb: - #map['word-en-de'] = "[^#{marker}].{1,250}\s(wrote|schrieb):" + # map['word-en-de'] = "[^#{marker}].{1,250}\s(wrote|schrieb):" map.each_value do |regexp| string.sub!(%r{#{regexp}}) do |placeholder| diff --git a/lib/external_credential/facebook.rb b/lib/external_credential/facebook.rb index 95f03e06b..aaa212fa1 100644 --- a/lib/external_credential/facebook.rb +++ b/lib/external_credential/facebook.rb @@ -32,8 +32,8 @@ class ExternalCredential::Facebook state = rand(999_999_999_999).to_s { request_token: state, - #authorize_url: oauth.url_for_oauth_code(permissions: 'publish_pages, manage_pages, user_posts', state: state), - #authorize_url: oauth.url_for_oauth_code(permissions: 'publish_pages, manage_pages', state: state), + # authorize_url: oauth.url_for_oauth_code(permissions: 'publish_pages, manage_pages, user_posts', state: state), + # authorize_url: oauth.url_for_oauth_code(permissions: 'publish_pages, manage_pages', state: state), authorize_url: oauth.url_for_oauth_code(permissions: 'pages_manage_posts, pages_manage_engagement, pages_manage_metadata, pages_read_engagement, pages_read_user_content', state: state), } end @@ -52,7 +52,7 @@ class ExternalCredential::Facebook access_token = oauth.get_access_token(params[:code]) client = Koala::Facebook::API.new(access_token) user = client.get_object('me') - #p client.get_connections('me', 'accounts').inspect + # p client.get_connections('me', 'accounts').inspect pages = [] client.get_connections('me', 'accounts').each do |page| pages.push( diff --git a/lib/facebook.rb b/lib/facebook.rb index 9caf1e9d5..9cb86b65d 100644 --- a/lib/facebook.rb +++ b/lib/facebook.rb @@ -284,7 +284,7 @@ result end article = { - #to: @account['name'], + # to: @account['name'], ticket_id: ticket.id, internal: false, sender_id: Ticket::Article::Sender.lookup(name: 'Customer').id, diff --git a/lib/idoit.rb b/lib/idoit.rb index a0feb9980..ca7e0a1fc 100644 --- a/lib/idoit.rb +++ b/lib/idoit.rb @@ -92,7 +92,7 @@ or with filter: raise 'Unable for find api_token in config' if setting[:api_token].blank? raise 'Unable for find endpoint in config' if setting[:endpoint].blank? - #translator_key = Setting.get('translator_key') + # translator_key = Setting.get('translator_key') params = { apikey: setting[:api_token], } diff --git a/lib/import/otrs/article.rb b/lib/import/otrs/article.rb index 8c95ece9d..dbd49709c 100644 --- a/lib/import/otrs/article.rb +++ b/lib/import/otrs/article.rb @@ -16,7 +16,7 @@ module Import Subject: :subject, InReplyTo: :in_reply_to, MessageID: :message_id, - #ReplyTo: :reply_to, + # ReplyTo: :reply_to, References: :references, ContentType: :content_type, Changed: :updated_at, diff --git a/lib/import/otrs/ticket.rb b/lib/import/otrs/ticket.rb index a4f2eff1c..7fbba20bc 100644 --- a/lib/import/otrs/ticket.rb +++ b/lib/import/otrs/ticket.rb @@ -16,13 +16,13 @@ module Import Title: :title, TicketID: :id, FirstResponse: :first_response_at, - #FirstResponseTimeDestinationDate: :first_response_escalation_at, - #FirstResponseInMin: :first_response_in_min, - #FirstResponseDiffInMin: :first_response_diff_in_min, + # FirstResponseTimeDestinationDate: :first_response_escalation_at, + # FirstResponseInMin: :first_response_in_min, + # FirstResponseDiffInMin: :first_response_diff_in_min, Closed: :close_at, - #SoltutionTimeDestinationDate: :close_escalation_at, - #CloseTimeInMin: :close_in_min, - #CloseTimeDiffInMin: :close_diff_in_min, + # SoltutionTimeDestinationDate: :close_escalation_at, + # CloseTimeInMin: :close_in_min, + # CloseTimeDiffInMin: :close_diff_in_min, }.freeze def initialize(ticket) diff --git a/lib/models.rb b/lib/models.rb index cd910930a..0d4691c36 100644 --- a/lib/models.rb +++ b/lib/models.rb @@ -55,9 +55,9 @@ returns all[model_class][:attributes] = model_class.attribute_names all[model_class][:reflections] = model_class.reflections all[model_class][:table] = model_class.table_name - #puts model_class - #puts "rrrr #{all[model_class][:attributes]}" - #puts " #{model_class.attribute_names.inspect}" + # puts model_class + # puts "rrrr #{all[model_class][:attributes]}" + # puts " #{model_class.attribute_names.inspect}" end all end diff --git a/lib/report/base.rb b/lib/report/base.rb index 276b39b4a..9adfc2d48 100644 --- a/lib/report/base.rb +++ b/lib/report/base.rb @@ -242,7 +242,7 @@ class Report::Base # puts 'FR:' + first_response.to_s # puts 'CT:' + ticket.created_at.to_s diff = timestamp - ticket.created_at - #puts 'DIFF:' + diff.to_s + # puts 'DIFF:' + diff.to_s time_total += diff tickets += 1 end @@ -275,7 +275,7 @@ class Report::Base # puts 'FR:' + first_response.to_s # puts 'CT:' + ticket.created_at.to_s diff = timestamp - ticket.created_at - #puts 'DIFF:' + diff.to_s + # puts 'DIFF:' + diff.to_s if !time_min time_min = diff end @@ -313,7 +313,7 @@ class Report::Base # puts 'FR:' + ticket.first_response.to_s # puts 'CT:' + ticket.created_at.to_s diff = timestamp - ticket.created_at - #puts 'DIFF:' + diff.to_s + # puts 'DIFF:' + diff.to_s if !time_max time_max = diff end diff --git a/lib/sessions/event/base.rb b/lib/sessions/event/base.rb index bc02b5f76..46c682aba 100644 --- a/lib/sessions/event/base.rb +++ b/lib/sessions/event/base.rb @@ -141,9 +141,9 @@ class Sessions::Event::Base end # rubocop:disable Rails/Output puts "#{Time.now.utc.iso8601}:client(#{client_id}) #{data}" - #puts "#{Time.now.utc.iso8601}:#{ level }:client(#{ client_id }) #{ data }" + # puts "#{Time.now.utc.iso8601}:#{ level }:client(#{ client_id }) #{ data }" # rubocop:enable Rails/Output - #Rails.logger.info "#{Time.now.utc.iso8601}:client(#{client_id}) #{data}" + # Rails.logger.info "#{Time.now.utc.iso8601}:client(#{client_id}) #{data}" end def self.database_connection_required diff --git a/lib/sessions/store/file.rb b/lib/sessions/store/file.rb index c9dc52ba3..1a4e28f03 100644 --- a/lib/sessions/store/file.rb +++ b/lib/sessions/store/file.rb @@ -218,8 +218,8 @@ class Sessions::Store::File nodes.push data rescue => e Rails.logger.error "can't parse status file #{filename}, #{e.inspect}" - #to_delete.push "#{path}/#{entry}" - #next + # to_delete.push "#{path}/#{entry}" + # next end end end @@ -260,8 +260,8 @@ class Sessions::Store::File yield data rescue => e Rails.logger.error "can't parse session file #{filename}, #{e.inspect}" - #to_delete.push "#{path}/#{entry}" - #next + # to_delete.push "#{path}/#{entry}" + # next end end end @@ -300,8 +300,8 @@ class Sessions::Store::File yield data rescue => e Rails.logger.error "can't parse session file #{filename}, #{e.inspect}" - #to_delete.push "#{path}/#{entry}" - #next + # to_delete.push "#{path}/#{entry}" + # next end end end diff --git a/lib/stats/ticket_channel_distribution.rb b/lib/stats/ticket_channel_distribution.rb index 71704fcc6..4795b0682 100644 --- a/lib/stats/ticket_channel_distribution.rb +++ b/lib/stats/ticket_channel_distribution.rb @@ -113,7 +113,7 @@ class Stats::TicketChannelDistribution # append in percent channels.each do |channel| # rubocop:disable Style/CombinableLoops count = result[channel[:sender].to_sym][:inbound] - #puts "#{channel.inspect}:in/#{result.inspect}:#{count}" + # puts "#{channel.inspect}:in/#{result.inspect}:#{count}" in_process_precent = if count.zero? 0 else diff --git a/lib/stats/ticket_reopen.rb b/lib/stats/ticket_reopen.rb index dcb31092b..31daf431c 100644 --- a/lib/stats/ticket_reopen.rb +++ b/lib/stats/ticket_reopen.rb @@ -43,8 +43,8 @@ class Stats::TicketReopen return result end - #in_percent = ( result[:used_for_average].to_f / (result[:average_per_agent].to_f / 100) ).round(1) - #result[:average_per_agent_in_percent] = in_percent + # in_percent = ( result[:used_for_average].to_f / (result[:average_per_agent].to_f / 100) ).round(1) + # result[:average_per_agent_in_percent] = in_percent in_percent = (result[:count].to_f / (result[:total].to_f / 100)).round(1) result[:state] = if in_percent >= 90 'superbad' diff --git a/lib/websocket_server.rb b/lib/websocket_server.rb index 023d42c9d..50e7a8958 100644 --- a/lib/websocket_server.rb +++ b/lib/websocket_server.rb @@ -163,7 +163,7 @@ class WebsocketServer def self.send_to_client return if @clients.size.zero? - #log 'debug', 'checking for data to send...' + # log 'debug', 'checking for data to send...' @clients.each do |client_id, client| next if client[:disconnect] @@ -213,6 +213,6 @@ class WebsocketServer return if !@options[:v] && level == 'debug' puts "#{Time.now.utc.iso8601}:client(#{client_id}) #{data}" # rubocop:disable Rails/Output - #puts "#{Time.now.utc.iso8601}:#{ level }:client(#{ client_id }) #{ data }" + # puts "#{Time.now.utc.iso8601}:#{ level }:client(#{ client_id }) #{ data }" end end diff --git a/spec/requests/integration/user_device_spec.rb b/spec/requests/integration/user_device_spec.rb index 85b1ae0cb..1e7e27d5f 100644 --- a/spec/requests/integration/user_device_spec.rb +++ b/spec/requests/integration/user_device_spec.rb @@ -166,7 +166,7 @@ RSpec.describe 'User Device', type: :request, sends_notification_emails: true do ENV['TEST_REMOTE_IP'] = '195.65.29.254' # ch - #reset_notification_checks + # reset_notification_checks params = {} get '/api/v1/users', params: params, as: :json diff --git a/test/browser/aaa_getting_started_test.rb b/test/browser/aaa_getting_started_test.rb index 9b86b35ce..23b7c6ac5 100644 --- a/test/browser/aaa_getting_started_test.rb +++ b/test/browser/aaa_getting_started_test.rb @@ -5,7 +5,7 @@ require 'browser_test_helper' class AaaGettingStartedTest < TestCase def test_a_getting_started if !ENV['MAILBOX_INIT'] - #raise "Need MAILBOX_INIT as ENV variable like export MAILBOX_INIT='unittest01@znuny.com:somepass'" + # raise "Need MAILBOX_INIT as ENV variable like export MAILBOX_INIT='unittest01@znuny.com:somepass'" puts "NOTICE: Need MAILBOX_INIT as ENV variable like export MAILBOX_INIT='unittest01@znuny.com:somepass'" return end @@ -146,9 +146,9 @@ class AaaGettingStartedTest < TestCase value: 'agent1@example.com', ) # not needed since we hide group selections if only one group exists - #click( + # click( # css: '.js-agent input[name="group_ids"][value="1"]', - #) + # ) click( css: '.js-agent .btn--success', ) diff --git a/test/browser/admin_calendar_sla_test.rb b/test/browser/admin_calendar_sla_test.rb index 4f893d300..81baa0541 100644 --- a/test/browser/admin_calendar_sla_test.rb +++ b/test/browser/admin_calendar_sla_test.rb @@ -57,7 +57,7 @@ class AdminCalendarSlaTest < TestCase timeout: 4, ) - #@browser.execute_script('$(\'.content.active table tr td:contains(" ' + data[:name] + '")\').first().click()') + # @browser.execute_script('$(\'.content.active table tr td:contains(" ' + data[:name] + '")\').first().click()') @browser.execute_script('$(\'.content.active .main .js-edit\').last().click()') modal_ready(browser: @browser) diff --git a/test/browser/admin_channel_email_test.rb b/test/browser/admin_channel_email_test.rb index 53f0b7908..681178920 100644 --- a/test/browser/admin_channel_email_test.rb +++ b/test/browser/admin_channel_email_test.rb @@ -6,7 +6,7 @@ class AdminChannelEmailTest < TestCase def test_account_add if !ENV['MAILBOX_INIT'] - #raise "Need MAILBOX_INIT as ENV variable like export MAILBOX_INIT='unittest01@znuny.com:somepass'" + # raise "Need MAILBOX_INIT as ENV variable like export MAILBOX_INIT='unittest01@znuny.com:somepass'" puts "NOTICE: Need MAILBOX_INIT as ENV variable like export MAILBOX_INIT='unittest01@znuny.com:somepass'" return end diff --git a/test/browser/admin_drag_drop_to_new_group_test.rb b/test/browser/admin_drag_drop_to_new_group_test.rb index 32e996003..7d5bf711a 100644 --- a/test/browser/admin_drag_drop_to_new_group_test.rb +++ b/test/browser/admin_drag_drop_to_new_group_test.rb @@ -74,7 +74,7 @@ class AdminDragDropToNewGroupTest < TestCase scroll_to(agent_permission.location.y) - toggle_checkbox(@browser.find_element(css: '.modal'), "\"#{permission_id}\"") #digit-only selector fails + toggle_checkbox(@browser.find_element(css: '.modal'), "\"#{permission_id}\"") # digit-only selector fails assign_group(group_name) @@ -135,7 +135,7 @@ class AdminDragDropToNewGroupTest < TestCase assert_not_nil role_container role_id = role_container.find_element(css: 'input').attribute(:value) - toggle_checkbox(role_container, "\"#{role_id}\"") #digit-only selector fails + toggle_checkbox(role_container, "\"#{role_id}\"") # digit-only selector fails end def get_group_element(group_name) diff --git a/test/browser/admin_object_manager_test.rb b/test/browser/admin_object_manager_test.rb index fe5c636ab..1d4dd6a6c 100644 --- a/test/browser/admin_object_manager_test.rb +++ b/test/browser/admin_object_manager_test.rb @@ -91,9 +91,9 @@ class AdminObjectManagerTest < TestCase title: 'ticket attribute test #1', body: 'ticket attribute test #1', }, - #custom_data_select: { + # custom_data_select: { # key1: 'some value', - #}, + # }, custom_data_input: { browser_test1: 'some value öäüß', }, @@ -103,9 +103,9 @@ class AdminObjectManagerTest < TestCase # update ticket ticket_update( data: {}, - #custom_data_select: { + # custom_data_select: { # key1: 'some value', - #}, + # }, custom_data_input: { browser_test1: 'some value ABC', }, @@ -190,9 +190,9 @@ class AdminObjectManagerTest < TestCase name: 'browser_test2', display: 'Browser Test 2', data_type: 'Text', - #data_option: { + # data_option: { # default: 'xxx', - #}, + # }, }, ) object_manager_attribute_create( @@ -215,11 +215,11 @@ class AdminObjectManagerTest < TestCase name: 'browser_test4', display: 'Browser Test 4', data_type: 'Integer', - #data_option: { + # data_option: { # default: 'xxx', # min: 15, # max: 99, - #}, + # }, }, ) @@ -228,11 +228,11 @@ class AdminObjectManagerTest < TestCase name: 'browser_test5', display: 'Browser Test 5', data_type: 'Datetime', - #data_option: { + # data_option: { # future: true, # past: true, # diff: 24 - #}, + # }, }, ) @@ -241,11 +241,11 @@ class AdminObjectManagerTest < TestCase name: 'browser_test6', display: 'Browser Test 6', data_type: 'Date', - #data_option: { + # data_option: { # future: true, # past: true, # diff: 24 - #}, + # }, }, ) diff --git a/test/browser/admin_role_test.rb b/test/browser/admin_role_test.rb index 9134587eb..849c096a9 100644 --- a/test/browser/admin_role_test.rb +++ b/test/browser/admin_role_test.rb @@ -175,7 +175,7 @@ class AdminRoleTest < TestCase user_email = "admin.user.#{rand}@example.com" user_create( data: { - #login: "some login #{random}", + # login: "some login #{random}", firstname: "Admin.User Firstname #{random}", lastname: "Admin.User Lastname #{random}", email: user_email, diff --git a/test/browser/agent_ticket_create_reset_customer_selection_test.rb b/test/browser/agent_ticket_create_reset_customer_selection_test.rb index 881214a5e..96805462b 100644 --- a/test/browser/agent_ticket_create_reset_customer_selection_test.rb +++ b/test/browser/agent_ticket_create_reset_customer_selection_test.rb @@ -238,7 +238,7 @@ class AgentTicketCreateResetCustomerSelectionTest < TestCase sleep 1 click(css: '.content.active .modal .js-submit') - #click(css: '.content.active .tabsSidebar-tabs .tabsSidebar-tab[data-tab="customer"]') + # click(css: '.content.active .tabsSidebar-tabs .tabsSidebar-tab[data-tab="customer"]') watch_for( css: '.content.active .tabsSidebar .sidebar[data-tab="customer"]', diff --git a/test/browser/agent_ticket_overview_tab_test.rb b/test/browser/agent_ticket_overview_tab_test.rb index a39eb27f7..7a4b96203 100644 --- a/test/browser/agent_ticket_overview_tab_test.rb +++ b/test/browser/agent_ticket_overview_tab_test.rb @@ -55,12 +55,12 @@ class AgentTicketOverviewTabTest < TestCase ) tasks_close_all - #click(text: 'Overviews') + # click(text: 'Overviews') # enable full overviews - #execute( + # execute( # js: '$(".content.active .sidebar").css("display", "block")', - #) - #click(text: 'Unassigned & Open') + # ) + # click(text: 'Unassigned & Open') ticket_open_by_overview( number: ticket1[:number], diff --git a/test/browser/agent_user_manage_test.rb b/test/browser/agent_user_manage_test.rb index b281e27e5..e9387ca16 100644 --- a/test/browser/agent_user_manage_test.rb +++ b/test/browser/agent_user_manage_test.rb @@ -202,7 +202,7 @@ class AgentUserManageTest < TestCase ) # there are 2 models, take the correct one - #click(css: '.content.active .modal button.js-submit') + # click(css: '.content.active .modal button.js-submit') @browser.execute_script("$('.content.active .modal input[name=\"firstname\"]').closest('form').find('button.js-submit').click()") # check is used to check selected diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index 71fa11dd3..c9386bbba 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -52,7 +52,7 @@ class TestCase < ActiveSupport::TestCase browser_profile['general.useragent.locale'] = 'en-US' # currently console log not working for firefox # https://github.com/SeleniumHQ/selenium/issues/1161 - #browser_profile['loggingPref'] = { browser: :all } + # browser_profile['loggingPref'] = { browser: :all } when 'chrome' # profile are only working on remote selenium @@ -873,7 +873,7 @@ class TestCase < ActiveSupport::TestCase dropdown.deselect_all end dropdown.select_by(:text, params[:value]) - #puts "select - #{params.inspect}" + # puts "select - #{params.inspect}" rescue sleep 0.4 @@ -885,7 +885,7 @@ class TestCase < ActiveSupport::TestCase dropdown.deselect_all end dropdown.select_by(:text, params[:value]) - #puts "select2 - #{params.inspect}" + # puts "select2 - #{params.inspect}" end await_empty_ajax_queue(params) @@ -949,9 +949,9 @@ class TestCase < ActiveSupport::TestCase instance = params[:browser] || @browser instance.execute_script("$('#{params[:css]}:not(:checked)').click()") - #element = instance.find_elements(css: params[:css])[0] - #checked = element.attribute('checked') - #element.click if !checked + # element = instance.find_elements(css: params[:css])[0] + # checked = element.attribute('checked') + # element.click if !checked end =begin @@ -970,9 +970,9 @@ class TestCase < ActiveSupport::TestCase instance = params[:browser] || @browser instance.execute_script("$('#{params[:css]}:checked').click()") - #element = instance.find_elements(css: params[:css])[0] - #checked = element.attribute('checked') - #element.click if checked + # element = instance.find_elements(css: params[:css])[0] + # checked = element.attribute('checked') + # element.click if checked end =begin @@ -1084,7 +1084,7 @@ class TestCase < ActiveSupport::TestCase match = false if params[:no_quote] - #puts "aaaa #{text}/#{params[:value]}" + # puts "aaaa #{text}/#{params[:value]}" if text =~ %r{#{params[:value]}}i match = $1 || true end @@ -1361,7 +1361,7 @@ set type of task (closeTab, closeNextInOverview, stayOnTab) # firefix/marionette issue with Selenium::WebDriver::Error::ElementNotInteractableError: could not be scrolled into view # use js workaround instead of native click instance.execute_script("$('#navigation .tasks .task:contains(\"#{data[:title]}\") .nav-tab-name').click()") - #element.click + # element.click true end @@ -1464,7 +1464,7 @@ set type of task (closeTab, closeNextInOverview, stayOnTab) text = '' (1..loops).each do element = instance.find_elements(selector_type => selector)[0] - if element #&& element.displayed? + if element # && element.displayed? begin # watch for selector if !params[:attribute] && !params[:value] @@ -1536,7 +1536,7 @@ wait untill text in selector disabppears text = '' (1..loops).each do element = instance.find_elements(css: params[:css])[0] - if !element #|| element.displayed? + if !element # || element.displayed? assert(true, 'not found') sleep 1 return true @@ -1615,7 +1615,7 @@ wait untill text in selector disabppears instance = params[:browser] || @browser 99.times do - #sleep 0.5 + # sleep 0.5 if instance.find_elements(css: '#navigation .tasks .task:first-child')[0] instance.action.move_to(instance.find_elements(css: '#navigation .tasks .task:first-child')[0]).release.perform @@ -1777,7 +1777,7 @@ wait untill text in selector disabppears sleep 2.5 element.send_keys(:enter) - #instance.find_elements(css: params[:css] + ' .recipientList-entry.js-object.is-active')[0].click + # instance.find_elements(css: params[:css] + ' .recipientList-entry.js-object.is-active')[0].click sleep 0.4 assert(true, 'ticket_customer_select') end @@ -2294,7 +2294,7 @@ wait untill text in selector disabppears return end - #instance.execute_script('$(".content.active .newTicket form").submit();') + # instance.execute_script('$(".content.active .newTicket form").submit();') click( browser: instance, css: '.content.active .newTicket button.js-submit', @@ -2376,13 +2376,13 @@ wait untill text in selector disabppears data = params[:data] if data[:title] - #element = instance.find_elements(:css => '.content.active .ticketZoom-header .js-objectTitle')[0] - #element.clear - #sleep 0.5 - #element = instance.find_elements(:css => '.content.active .ticketZoom-header .js-objectTitle')[0] - #element.send_keys(data[:title]) - #sleep 0.5 - #element.send_keys(:tab) + # element = instance.find_elements(:css => '.content.active .ticketZoom-header .js-objectTitle')[0] + # element.clear + # sleep 0.5 + # element = instance.find_elements(:css => '.content.active .ticketZoom-header .js-objectTitle')[0] + # element.send_keys(data[:title]) + # sleep 0.5 + # element.send_keys(:tab) instance.execute_script('$(".content.active .ticketZoom-header .js-objectTitle").focus()') instance.execute_script(%($(".content.active .ticketZoom-header .js-objectTitle").text("#{data[:title]}"))) @@ -2422,7 +2422,7 @@ wait untill text in selector disabppears sleep 2.5 element.send_keys(:enter) - #instance.find_elements(css: '.modal .user_autocompletion .recipientList-entry.js-object.is-active')[0].click + # instance.find_elements(css: '.modal .user_autocompletion .recipientList-entry.js-object.is-active')[0].click sleep 0.2 click(browser: instance, css: '.modal .js-submit') @@ -2805,7 +2805,7 @@ wait untill text in selector disabppears sleep 3 # open ticket - #instance.find_element(partial_link_text: params[:number] } ).click + # instance.find_element(partial_link_text: params[:number] } ).click instance.execute_script("$(\".js-global-search-result a:contains('#{params[:number]}') .nav-tab-name\").first().click()") watch_for( browser: instance, @@ -2842,7 +2842,7 @@ wait untill text in selector disabppears sleep 3 # open ticket - #instance.find_element(partial_link_text: params[:title] } ).click + # instance.find_element(partial_link_text: params[:title] } ).click instance.execute_script("$(\".js-global-search-result a:contains('#{params[:title]}') .nav-tab-name\").first().click()") sleep 1 title = instance.find_elements(css: '.content.active .ticketZoom-header .js-objectTitle')[0].text @@ -2879,10 +2879,10 @@ wait untill text in selector disabppears browser: instance, js: '$(".content.active .sidebar").css("display", "block")', ) - #execute( + # execute( # browser: instance, # js: '$(".content.active .overview-header").css("display", "none")', - #) + # ) begin overviews = {} @@ -2890,8 +2890,8 @@ wait untill text in selector disabppears url = element.attribute('href') url.gsub!(%r{(http|https)://.+?/(.+?)$}, '\\2') overviews[url] = 0 - #puts url.inspect - #puts element.inspect + # puts url.inspect + # puts element.inspect end overviews.each_key do |url| @@ -2945,7 +2945,7 @@ wait untill text in selector disabppears css: '.navigation .search.loading' ) - #instance.find_element(partial_link_text: params[:value] } ).click + # instance.find_element(partial_link_text: params[:value] } ).click instance.execute_script("$(\".js-global-search-result a:contains('#{params[:value]}') .nav-tab-name\").first().click()") watch_for( browser: instance, @@ -2981,7 +2981,7 @@ wait untill text in selector disabppears element.send_keys(params[:value]) sleep 3 - #instance.find_element(partial_link_text: params[:value]).click + # instance.find_element(partial_link_text: params[:value]).click instance.execute_script("$(\".js-global-search-result a:contains('#{params[:value]}') .nav-tab-name\").first().click()") watch_for( browser: instance, @@ -3672,7 +3672,7 @@ wait untill text in selector disabppears element = instance.find_elements(css: '.modal select[name="email_address_id"]')[0] dropdown = Selenium::WebDriver::Support::Select.new(element) dropdown.select_by(:index, 1) - #dropdown.select_by(:text, action[:group]) + # dropdown.select_by(:text, action[:group]) if data[:signature] element = instance.find_elements(css: '.modal select[name="signature_id"]')[0] dropdown = Selenium::WebDriver::Support::Select.new(element) @@ -3699,10 +3699,10 @@ wait untill text in selector disabppears element.clear element.send_keys(member[:login]) sleep 3 - #instance.find_elements(:css => '.content.active table [data-id]')[0].click + # instance.find_elements(:css => '.content.active table [data-id]')[0].click instance.execute_script('$(".content.active table [data-id] td").first().click()') modal_ready(browser: instance) - #instance.find_elements(:css => 'label:contains(" ' + action[:name] + '")')[0].click + # instance.find_elements(:css => 'label:contains(" ' + action[:name] + '")')[0].click instance.execute_script(%($(".js-groupList tr:contains(\\"#{data[:name]}\\") .js-groupListItem[value=#{member[:access]}]").prop("checked", true))) instance.find_elements(css: '.modal button.js-submit')[0].click await_empty_ajax_queue(params) @@ -3904,10 +3904,10 @@ wait untill text in selector disabppears element.clear element.send_keys(login) sleep 3 - #instance.find_elements(:css => '.content.active table [data-id]')[0].click + # instance.find_elements(:css => '.content.active table [data-id]')[0].click instance.execute_script('$(".content.active table [data-id] td").first().click()') sleep 3 - #instance.find_elements(:css => 'label:contains(" ' + action[:name] + '")')[0].click + # instance.find_elements(:css => 'label:contains(" ' + action[:name] + '")')[0].click instance.execute_script(%($('label:contains(" #{data[:name]}")').first().click())) instance.find_elements(css: '.modal button.js-submit')[0].click modal_disappear(browser: instance) @@ -4029,10 +4029,10 @@ wait untill text in selector disabppears element.clear element.send_keys(login) sleep 3 - #instance.find_elements(:css => '.content.active table [data-id]')[0].click + # instance.find_elements(:css => '.content.active table [data-id]')[0].click instance.execute_script('$(".content.active table [data-id] td").first().click()') sleep 3 - #instance.find_elements(:css => 'label:contains(" ' + action[:name] + '")')[0].click + # instance.find_elements(:css => 'label:contains(" ' + action[:name] + '")')[0].click instance.execute_script(%($('label:contains(" #{data[:name]}")').first().click())) instance.find_elements(css: '.modal button.js-submit')[0].click modal_disappear(browser: instance) diff --git a/test/integration/clearbit_test.rb b/test/integration/clearbit_test.rb index 238445d56..fb4381aff 100644 --- a/test/integration/clearbit_test.rb +++ b/test/integration/clearbit_test.rb @@ -27,8 +27,8 @@ class ClearbitTest < ActiveSupport::TestCase 'person.site' => 'user.web', 'company.location' => 'user.address', 'person.location' => 'user.address', - #'person.timeZone' => 'user.preferences[:timezone]', - #'person.gender' => 'user.preferences[:gender]', + # 'person.timeZone' => 'user.preferences[:timezone]', + # 'person.gender' => 'user.preferences[:gender]', }, organization_sync: { 'company.legalName' => 'organization.name', @@ -270,7 +270,7 @@ class ClearbitTest < ActiveSupport::TestCase assert_equal('', customer6.lastname) assert_equal('', customer6.note) assert_equal('', customer6.web) - #assert_equal('http://clearbit.com', customer6.web) + # assert_equal('http://clearbit.com', customer6.web) sometimes_changing_but_valid_addresses = [ 'San Francisco, CA, USA', 'San Francisco, CA 94103, USA', diff --git a/test/integration/email_keep_on_server_test.rb b/test/integration/email_keep_on_server_test.rb index a921ad8d9..b6810041b 100644 --- a/test/integration/email_keep_on_server_test.rb +++ b/test/integration/email_keep_on_server_test.rb @@ -44,7 +44,7 @@ class EmailKeepOnServerTest < ActiveSupport::TestCase password: @server_password, ssl: true, folder: @folder, - #keep_on_server: true, + # keep_on_server: true, } }, outbound: { diff --git a/test/integration/geo_location_test.rb b/test/integration/geo_location_test.rb index 9cb6caebb..650925054 100644 --- a/test/integration/geo_location_test.rb +++ b/test/integration/geo_location_test.rb @@ -7,7 +7,7 @@ class GeoLocationTest < ActiveSupport::TestCase setup do @mock = true - #WebMock.allow_net_connect! + # WebMock.allow_net_connect! end # check diff --git a/test/integration/otrs_import_test.rb b/test/integration/otrs_import_test.rb index 65ed38a6f..1111a9f90 100644 --- a/test/integration/otrs_import_test.rb +++ b/test/integration/otrs_import_test.rb @@ -55,7 +55,7 @@ class OtrsImportTest < ActiveSupport::TestCase role_admin = Role.where(name: 'Admin').first role_agent = Role.where(name: 'Agent').first role_customer = Role.where(name: 'Customer').first - #role_report = Role.where( :name => 'Report' ).first + # role_report = Role.where( :name => 'Report' ).first user1 = User.find(2) assert_equal('agent-1 firstname', user1.firstname) @@ -67,7 +67,7 @@ class OtrsImportTest < ActiveSupport::TestCase assert(user1.roles.include?(role_agent)) assert_not(user1.roles.include?(role_admin)) assert_not(user1.roles.include?(role_customer)) - #assert_not( user1.roles.include?( role_report ) ) + # assert_not( user1.roles.include?( role_report ) ) group_dasa = Group.where(name: 'dasa').first group_raw = Group.where(name: 'Raw').first @@ -85,7 +85,7 @@ class OtrsImportTest < ActiveSupport::TestCase assert(user2.roles.include?(role_agent)) assert(user2.roles.include?(role_admin)) assert_not(user2.roles.include?(role_customer)) - #assert( user2.roles.include?( role_report ) ) + # assert( user2.roles.include?( role_report ) ) assert(user2.groups_access('full').include?(group_dasa)) assert(user2.groups_access('full').include?(group_raw)) @@ -100,7 +100,7 @@ class OtrsImportTest < ActiveSupport::TestCase assert(user3.roles.include?(role_agent)) assert_not(user3.roles.include?(role_admin)) assert_not(user3.roles.include?(role_customer)) - #assert( user3.roles.include?( role_report ) ) + # assert( user3.roles.include?( role_report ) ) assert_not(user3.groups_access('full').include?(group_dasa)) assert_not(user3.groups_access('full').include?(group_raw)) @@ -115,7 +115,7 @@ class OtrsImportTest < ActiveSupport::TestCase assert(user4.roles.include?(role_agent)) assert_not(user4.roles.include?(role_admin)) assert_not(user4.roles.include?(role_customer)) - #assert( user4.roles.include?( role_report ) ) + # assert( user4.roles.include?( role_report ) ) assert_not(user4.groups_access('full').include?(group_dasa)) assert_not(user4.groups_access('full').include?(group_raw)) diff --git a/test/integration/user_agent_test.rb b/test/integration/user_agent_test.rb index 5e90bbed7..9e346e95a 100644 --- a/test/integration/user_agent_test.rb +++ b/test/integration/user_agent_test.rb @@ -4,7 +4,7 @@ require 'integration_test_helper' class UserAgentTest < ActiveSupport::TestCase host = 'https://web-test.dc.zammad.com' - #host = 'http://127.0.0.1:3003' + # host = 'http://127.0.0.1:3003' setup do if ENV['ZAMMAD_PROXY_TEST'] == 'true' @@ -358,7 +358,7 @@ class UserAgentTest < ActiveSupport::TestCase # ftp / 200 result = UserAgent.request( - #'ftp://root.cern.ch/pub/README-root-build.txt', + # 'ftp://root.cern.ch/pub/README-root-build.txt', 'ftp://ftp.gwdg.de/pub/rfc/rfc-index.txt', ) assert(result) @@ -369,7 +369,7 @@ class UserAgentTest < ActiveSupport::TestCase # ftp / 401 result = UserAgent.request( - #'ftp://root.cern.ch/pub/not_existing.msg', + # 'ftp://root.cern.ch/pub/not_existing.msg', 'ftp://ftp.gwdg.de/pub/rfc/not_existing.txt', ) assert(result) diff --git a/test/unit/integration_nagios_test.rb b/test/unit/integration_nagios_test.rb index 69b636af3..5caeb86bf 100644 --- a/test/unit/integration_nagios_test.rb +++ b/test/unit/integration_nagios_test.rb @@ -209,7 +209,7 @@ Comment: [] = assert_nil(ticket_3_1.preferences['nagios']['service']) assert_equal('DOWN', ticket_3_1.preferences['nagios']['state']) - #Setting.set('nagios_integration', false) + # Setting.set('nagios_integration', false) end diff --git a/test/unit/karma_test.rb b/test/unit/karma_test.rb index 8785dbbcd..2aa00140e 100644 --- a/test/unit/karma_test.rb +++ b/test/unit/karma_test.rb @@ -325,7 +325,7 @@ class KarmaTest < ActiveSupport::TestCase assert_equal(0, Karma.score_by_user(customer1)) ticket1.tag_add('Tag1', agent1.id) - #travel 5.seconds + # travel 5.seconds ticket1.tag_add('Tag2', agent1.id) # execute object transaction @@ -465,8 +465,8 @@ class KarmaTest < ActiveSupport::TestCase TransactionDispatcher.commit Scheduler.worker(true) - #Scheduler.worker(true) - #Ticket::Escalation.rebuild_all + # Scheduler.worker(true) + # Ticket::Escalation.rebuild_all Ticket.process_escalation assert_equal(10 + 2 + 25 + 4 + 10 - 5 - 5, Karma.score_by_user(agent1)) diff --git a/test/unit/notification_factory_renderer_test.rb b/test/unit/notification_factory_renderer_test.rb index 2cfac5dbe..f919c70dc 100644 --- a/test/unit/notification_factory_renderer_test.rb +++ b/test/unit/notification_factory_renderer_test.rb @@ -246,7 +246,7 @@ class NotificationFactoryRendererTest < ActiveSupport::TestCase test 'translation' do - #template = "<%= t 'new' %>" + # template = "<%= t 'new' %>" template = "\#{t('new')}" result = described_class.new( objects: { diff --git a/test/unit/ticket_notification_test.rb b/test/unit/ticket_notification_test.rb index 609ed1a6e..c13079424 100644 --- a/test/unit/ticket_notification_test.rb +++ b/test/unit/ticket_notification_test.rb @@ -1015,8 +1015,8 @@ class TicketNotificationTest < ActiveSupport::TestCase group: Group.lookup(name: 'TicketNotificationTest'), customer: @customer, owner_id: @agent2.id, - #state: Ticket::State.lookup(name: 'new'), - #priority: Ticket::Priority.lookup(name: '2 normal'), + # state: Ticket::State.lookup(name: 'new'), + # priority: Ticket::Priority.lookup(name: '2 normal'), updated_by_id: @customer.id, created_by_id: @customer.id, ) @@ -1058,8 +1058,8 @@ class TicketNotificationTest < ActiveSupport::TestCase group: Group.lookup(name: 'TicketNotificationTest'), customer: @customer, owner_id: @agent2.id, - #state: Ticket::State.lookup(name: 'new'), - #priority: Ticket::Priority.lookup(name: '2 normal'), + # state: Ticket::State.lookup(name: 'new'), + # priority: Ticket::Priority.lookup(name: '2 normal'), updated_by_id: @customer.id, created_by_id: @customer.id, ) diff --git a/test/unit/ticket_overview_test.rb b/test/unit/ticket_overview_test.rb index 85e3f6a55..59d18bde2 100644 --- a/test/unit/ticket_overview_test.rb +++ b/test/unit/ticket_overview_test.rb @@ -33,7 +33,7 @@ class TicketOverviewTest < ActiveSupport::TestCase password: 'agentpw', active: true, roles: roles, - #groups: groups, + # groups: groups, updated_at: '2015-02-05 16:38:00', updated_by_id: 1, created_by_id: 1, diff --git a/test/unit/ticket_selector_test.rb b/test/unit/ticket_selector_test.rb index 8b44dfe7f..3498865a6 100644 --- a/test/unit/ticket_selector_test.rb +++ b/test/unit/ticket_selector_test.rb @@ -86,7 +86,7 @@ class TicketSelectorTest < ActiveSupport::TestCase state: Ticket::State.lookup(name: 'new'), priority: Ticket::Priority.lookup(name: '2 normal'), created_at: '2015-02-05 16:37:00', - #updated_at: '2015-02-05 17:37:00', + # updated_at: '2015-02-05 17:37:00', updated_by_id: 1, created_by_id: 1, ) @@ -102,7 +102,7 @@ class TicketSelectorTest < ActiveSupport::TestCase state: Ticket::State.lookup(name: 'new'), priority: Ticket::Priority.lookup(name: '2 normal'), created_at: '2015-02-05 16:37:00', - #updated_at: '2015-02-05 17:37:00', + # updated_at: '2015-02-05 17:37:00', updated_by_id: 1, created_by_id: 1, ) @@ -118,7 +118,7 @@ class TicketSelectorTest < ActiveSupport::TestCase state: Ticket::State.lookup(name: 'open'), priority: Ticket::Priority.lookup(name: '2 normal'), created_at: '2015-02-05 16:37:00', - #updated_at: '2015-02-05 17:37:00', + # updated_at: '2015-02-05 17:37:00', updated_by_id: 1, created_by_id: 1, ) @@ -773,7 +773,7 @@ class TicketSelectorTest < ActiveSupport::TestCase 'ticket.owner_id' => { operator: 'is', pre_condition: 'specific', - #value: @agent1.id, # value is not set, no result should be shown + # value: @agent1.id, # value is not set, no result should be shown }, } ticket_count, tickets = Ticket.selectors(condition, limit: 10, current_user: @agent1) diff --git a/test/unit/ticket_trigger_recursive_disabled_test.rb b/test/unit/ticket_trigger_recursive_disabled_test.rb index 75120fc93..a975ce548 100644 --- a/test/unit/ticket_trigger_recursive_disabled_test.rb +++ b/test/unit/ticket_trigger_recursive_disabled_test.rb @@ -947,7 +947,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase assert_equal('2 normal', ticket_p.priority.name, 'ticket_p.priority verify') assert_equal(2, ticket_p.articles.count, 'ticket_p.articles verify') - #p ticket_p.articles.last.inspect + # p ticket_p.articles.last.inspect article_p = ticket_p.articles.last assert_match('Owner has changed', article_p.subject) assert_match('Zammad ', article_p.from) @@ -1026,7 +1026,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase assert_equal('3 high', ticket_p.priority.name, 'ticket_p.priority verify') assert_equal(2, ticket_p.articles.count, 'ticket_p.articles verify') - #p ticket_p.articles.last.inspect + # p ticket_p.articles.last.inspect article_p = ticket_p.articles.last assert_match('Owner has changed', article_p.subject) assert_match('Zammad ', article_p.from) @@ -1109,7 +1109,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase assert_equal('3 high', ticket_p.priority.name, 'ticket_p.priority verify') assert_equal(2, ticket_p.articles.count, 'ticket_p.articles verify') - #p ticket_p.articles.last.inspect + # p ticket_p.articles.last.inspect article_p = ticket_p.articles.last assert_match('Owner has changed', article_p.subject) assert_match('Zammad ', article_p.from) @@ -1349,7 +1349,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, group: Group.lookup(name: 'Users'), customer: User.lookup(email: 'nicole.braun@zammad.org'), updated_by_id: 1, @@ -1705,7 +1705,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, group: Group.lookup(name: 'Users'), customer: User.lookup(email: 'nicole.braun@zammad.org'), updated_by_id: 1, @@ -1888,7 +1888,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, group: Group.lookup(name: 'Users'), customer: User.lookup(email: 'nicole.braun@zammad.org'), updated_by_id: 1, @@ -2599,7 +2599,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, customer: customer, group: Group.lookup(name: 'Users'), updated_by_id: 1, @@ -3563,7 +3563,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase 'value' => Ticket::State.lookup(name: 'new').id.to_s, }, 'ticket.tags' => { - #'operator' => 'contains one not', + # 'operator' => 'contains one not', 'operator' => 'contains all not', 'value' => 'sender1, sender2', }, diff --git a/test/unit/ticket_trigger_test.rb b/test/unit/ticket_trigger_test.rb index 1c6f78fb8..76316e23a 100644 --- a/test/unit/ticket_trigger_test.rb +++ b/test/unit/ticket_trigger_test.rb @@ -973,7 +973,7 @@ class TicketTriggerTest < ActiveSupport::TestCase assert_equal('2 normal', ticket_p.priority.name, 'ticket_p.priority verify') assert_equal(2, ticket_p.articles.count, 'ticket_p.articles verify') - #p ticket_p.articles.last.inspect + # p ticket_p.articles.last.inspect article_p = ticket_p.articles.last assert_match('Owner has changed', article_p.subject) assert_match('Zammad ', article_p.from) @@ -1052,7 +1052,7 @@ class TicketTriggerTest < ActiveSupport::TestCase assert_equal('3 high', ticket_p.priority.name, 'ticket_p.priority verify') assert_equal(2, ticket_p.articles.count, 'ticket_p.articles verify') - #p ticket_p.articles.last.inspect + # p ticket_p.articles.last.inspect article_p = ticket_p.articles.last assert_match('Owner has changed', article_p.subject) assert_match('Zammad ', article_p.from) @@ -1135,7 +1135,7 @@ class TicketTriggerTest < ActiveSupport::TestCase assert_equal('3 high', ticket_p.priority.name, 'ticket_p.priority verify') assert_equal(2, ticket_p.articles.count, 'ticket_p.articles verify') - #p ticket_p.articles.last.inspect + # p ticket_p.articles.last.inspect article_p = ticket_p.articles.last assert_match('Owner has changed', article_p.subject) assert_match('Zammad ', article_p.from) @@ -1375,7 +1375,7 @@ class TicketTriggerTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, group: Group.lookup(name: 'Users'), customer: User.lookup(email: 'nicole.braun@zammad.org'), updated_by_id: 1, @@ -1731,7 +1731,7 @@ class TicketTriggerTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, group: Group.lookup(name: 'Users'), customer: User.lookup(email: 'nicole.braun@zammad.org'), updated_by_id: 1, @@ -1914,7 +1914,7 @@ class TicketTriggerTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, group: Group.lookup(name: 'Users'), customer: User.lookup(email: 'nicole.braun@zammad.org'), updated_by_id: 1, @@ -2625,7 +2625,7 @@ class TicketTriggerTest < ActiveSupport::TestCase ticket1 = Ticket.create!( title: 'test 123', - #owner: agent, + # owner: agent, customer: customer, group: Group.lookup(name: 'Users'), updated_by_id: 1, @@ -3589,7 +3589,7 @@ class TicketTriggerTest < ActiveSupport::TestCase 'value' => Ticket::State.lookup(name: 'new').id.to_s, }, 'ticket.tags' => { - #'operator' => 'contains one not', + # 'operator' => 'contains one not', 'operator' => 'contains all not', 'value' => 'sender1, sender2', }, @@ -4596,7 +4596,7 @@ class TicketTriggerTest < ActiveSupport::TestCase end end - #2399 - Attached images are broken on trigger reply with #{article.body_as_html} + # 2399 - Attached images are broken on trigger reply with #{article.body_as_html} test 'make sure auto reply using #{article.body_as_html} copies all articles image attachments as well' do # make sure that this auto reply trigger only reacts to this particular test in order not to interfer with other auto reply tests Trigger.create!( @@ -4641,7 +4641,7 @@ class TicketTriggerTest < ActiveSupport::TestCase assert_equal('CPG-Reklamationsmitteilung bezügl.01234567895 an Voda-28.03.2017.jpg', article1.attachments[0].filename) end - #2399 - Attached images are broken on trigger reply with #{article.body_as_html} + # 2399 - Attached images are broken on trigger reply with #{article.body_as_html} test 'make sure auto reply using #{article.body_as_html} does not copy any non-image attachments' do # make sure that this auto reply trigger only reacts to this particular test in order not to interfer with other auto reply tests Trigger.create!( diff --git a/test/unit/user_assets_test.rb b/test/unit/user_assets_test.rb index d4bd79e68..7fe5cc95b 100644 --- a/test/unit/user_assets_test.rb +++ b/test/unit/user_assets_test.rb @@ -115,7 +115,7 @@ class UserAssetsTest < ActiveSupport::TestCase end return true if (object1.to_a - object2.to_a).blank? - #puts "ERROR: difference \n1: #{object1.inspect}\n2: #{object2.inspect}\ndiff: #{(object1.to_a - object2.to_a).inspect}" + # puts "ERROR: difference \n1: #{object1.inspect}\n2: #{object2.inspect}\ndiff: #{(object1.to_a - object2.to_a).inspect}" false end diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index f2441af12..b99f4d1b0 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -411,7 +411,7 @@ class UserTest < ActiveSupport::TestCase login: login, firstname: 'Role', lastname: "Admin#{name}", - #email: "", + # email: "", password: 'adminpw', active: true, roles: Role.where(name: %w[Admin Agent]), @@ -449,7 +449,7 @@ class UserTest < ActiveSupport::TestCase login: login, firstname: 'Role', lastname: "Admin#{name}", - #email: "", + # email: "", password: 'adminpw', active: true, roles: Role.where(name: %w[Admin Agent]), @@ -1223,7 +1223,7 @@ class UserTest < ActiveSupport::TestCase Cti::CallerId.maybe_add( caller_id: '49123456789', - comment: 'Hairdresser Bob Smith, San Francisco', #optional + comment: 'Hairdresser Bob Smith, San Francisco', # optional level: 'maybe', # known|maybe user_id: agent1_id, # optional object: 'Ticket',