Epp contact tests now 10x faster

This commit is contained in:
Priit Tark 2015-01-26 15:45:11 +02:00
parent 4e7b0e6104
commit 4401d8495e
9 changed files with 361 additions and 324 deletions

View file

@ -16,6 +16,7 @@ class Epp::ContactsController < EppController
def update
# FIXME: Update returns 2303 update multiple times
code = params_hash['epp']['command']['update']['update'][:id]
@contact = Contact.where(code: code).first
# if update_rights? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
if owner? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))

View file

@ -124,6 +124,7 @@ class EppController < ApplicationController
# rubocop: enable Style/PredicateName
def write_to_epp_log
return nil if EPP_LOG_ENABLED
request_command = params[:command] || params[:action] # error receives :command, other methods receive :action
ApiLog::EppLog.create({
request: params[:raw_frame] || params[:frame],