mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
fixed tests
This commit is contained in:
parent
045b5f03ba
commit
48c14b8a39
4 changed files with 6 additions and 3 deletions
|
@ -34,7 +34,7 @@ module Epp
|
|||
code: '2502',
|
||||
msg: Shunter.default_error_message)
|
||||
handle_errors
|
||||
log_exception(exception)
|
||||
log_exception(exception) unless Rails.env.test?
|
||||
end
|
||||
|
||||
def respond_with_command_failed_error(exception)
|
||||
|
|
|
@ -29,7 +29,7 @@ module Repp
|
|||
render(json: @response, status: :unauthorized)
|
||||
rescue Shunter::ThrottleError => e
|
||||
@response = { code: 2502, message: Shunter.default_error_message }
|
||||
logger.error e.to_s
|
||||
logger.error e.to_s unless Rails.env.test?
|
||||
render(json: @response, status: :bad_request)
|
||||
ensure
|
||||
create_repp_log
|
||||
|
|
|
@ -26,7 +26,7 @@ module Shunter
|
|||
logger.info "Request from #{throttled_user.class}/#{throttled_user.id} is coming through throttling"
|
||||
yield if block_given?
|
||||
else
|
||||
logger.info "Too many requests from #{throttled_user.class}/#{throttled_user.id}."
|
||||
logger.info "Too many requests from #{throttled_user.class}/#{throttled_user.id}." unless Rails.env.test?
|
||||
raise Shunter::ThrottleError
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue