Merge branch 'master' into refactor-devise-integration

# Conflicts:
#	spec/features/registrar/sign_in/mobile_id_spec.rb
This commit is contained in:
Artur Beljajev 2018-07-12 18:59:11 +03:00
commit 8b7769e19e
10 changed files with 106 additions and 40 deletions

View file

@ -1,20 +0,0 @@
require 'rails_helper'
RSpec.feature 'Mobile ID login', db: true do
given!(:api_user) { create(:api_user, identity_code: 1234) }
background do
digidoc_client = instance_double(Digidoc::Client, authenticate: OpenStruct.new(user_id_code: 1234), session_code: 1234)
allow(Digidoc::Client).to receive(:new).and_return(digidoc_client)
end
scenario 'login with phone number' do
visit new_registrar_user_session_url
click_on 'login-with-mobile-id-btn'
fill_in 'user[phone]', with: '1234'
click_button 'Login'
expect(page).to have_text('Confirmation sms was sent to your phone. Verification code is')
end
end