mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Rewrite test to find the flash message
This commit is contained in:
parent
e1f77c1d03
commit
0e86214d1c
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class SignInTest < ActionDispatch::IntegrationTest
|
||||
class RegistrarSignInTest < JavascriptIntegrationTest
|
||||
self.use_transactional_fixtures = false
|
||||
|
||||
def setup
|
||||
super
|
||||
WebMock.allow_net_connect!
|
||||
|
@ -26,7 +28,9 @@ class SignInTest < ActionDispatch::IntegrationTest
|
|||
fill_in 'user[phone]', with: '1234'
|
||||
click_button 'Login'
|
||||
|
||||
assert(page.has_text?('Confirmation sms was sent to your phone. Verification code is'))
|
||||
flash_message = page.find('div.bg-success')
|
||||
assert_equal('Confirmation sms was sent to your phone. Verification code is .',
|
||||
flash_message.text)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue