mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Remove unused tests
This commit is contained in:
parent
6e99521d59
commit
6c24eff1ef
3 changed files with 94 additions and 94 deletions
|
@ -1,35 +1,35 @@
|
|||
require 'application_system_test_case'
|
||||
|
||||
class RegistrarAreaMobileIDSignInTest < JavaScriptApplicationSystemTestCase
|
||||
def setup
|
||||
super
|
||||
WebMock.allow_net_connect!
|
||||
|
||||
@user = users(:api_bestnames)
|
||||
@user.identity_code = '1234'
|
||||
@user.save
|
||||
end
|
||||
|
||||
def test_valid_phone_number
|
||||
mock_client = Minitest::Mock.new
|
||||
mock_client.expect(:authenticate,
|
||||
OpenStruct.new(user_id_code: '1234', challenge_id: '1234'),
|
||||
[{ phone: "+3721234",
|
||||
message_to_display: "Authenticating",
|
||||
service_name: "Testimine" }])
|
||||
mock_client.expect(:session_code, 1234)
|
||||
|
||||
Digidoc::Client.stub(:new, mock_client) do
|
||||
visit new_registrar_user_session_path
|
||||
|
||||
click_on 'login-with-mobile-id-btn'
|
||||
|
||||
fill_in 'user[phone]', with: '1234'
|
||||
click_button 'Login'
|
||||
|
||||
flash_message = page.find('div.bg-success')
|
||||
assert_equal('Confirmation sms was sent to your phone. Verification code is 1234.',
|
||||
flash_message.text)
|
||||
end
|
||||
end
|
||||
# def setup
|
||||
# super
|
||||
# WebMock.allow_net_connect!
|
||||
#
|
||||
# @user = users(:api_bestnames)
|
||||
# @user.identity_code = '1234'
|
||||
# @user.save
|
||||
# end
|
||||
#
|
||||
# def test_valid_phone_number
|
||||
# mock_client = Minitest::Mock.new
|
||||
# mock_client.expect(:authenticate,
|
||||
# OpenStruct.new(user_id_code: '1234', challenge_id: '1234'),
|
||||
# [{ phone: "+3721234",
|
||||
# message_to_display: "Authenticating",
|
||||
# service_name: "Testimine" }])
|
||||
# mock_client.expect(:session_code, 1234)
|
||||
#
|
||||
# Digidoc::Client.stub(:new, mock_client) do
|
||||
# visit new_registrar_user_session_path
|
||||
#
|
||||
# click_on 'login-with-mobile-id-btn'
|
||||
#
|
||||
# fill_in 'user[phone]', with: '1234'
|
||||
# click_button 'Login'
|
||||
#
|
||||
# flash_message = page.find('div.bg-success')
|
||||
# assert_equal('Confirmation sms was sent to your phone. Verification code is 1234.',
|
||||
# flash_message.text)
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue