Improve registrar sessions specs

registry-240
This commit is contained in:
Artur Beljajev 2016-11-09 19:12:51 +02:00
parent 576c09b00d
commit 2643df8d21
7 changed files with 43 additions and 13 deletions

View file

@ -101,12 +101,6 @@ class Registrar::SessionsController < Devise::SessionsController
endpoint = "#{ENV['sk_digi_doc_service_endpoint']}"
client = Digidoc::Client.new(endpoint)
if Rails.env.test? && phone == "123"
@user = ApiUser.find_by(identity_code: "14212128025")
sign_in(@user, event: :authentication)
return redirect_to registrar_root_url
end
# country_codes = {'+372' => 'EST'}
phone.gsub!('+372', '')
response = client.authenticate(