Rewrite test to find the flash message

This commit is contained in:
Maciej Szlosarczyk 2018-07-09 10:35:57 +03:00
parent e1f77c1d03
commit 0e86214d1c
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765

View file

@ -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