Move tara test to system cases

This commit is contained in:
Karl Erik Õunapuu 2020-10-02 10:52:45 +03:00
parent ed29bef7f1
commit b6b036f37f
No known key found for this signature in database
GPG key ID: C9DD647298A34764

View file

@ -37,13 +37,15 @@ class RegistrantAreaTaraUsersTest < ApplicationSystemTestCase
end end
def test_new_user_is_created_and_signed_in def test_new_user_is_created_and_signed_in
OmniAuth.config.mock_auth[:tara] = OmniAuth::AuthHash.new(@new_user_hash) OmniAuth.config.mock_auth[:rant_tara] = OmniAuth::AuthHash.new(@new_user_hash)
assert_difference 'RegistrantUser.count' do
visit new_registrant_user_session_path visit new_registrant_user_session_path
click_link('Sign in') click_link('Sign in')
assert_equal 'New Registrant User', RegistrantUser.last.username
assert_equal 'EE-51007050604', RegistrantUser.last.registrant_ident
assert_text('Signed in successfully') assert_text('Signed in successfully')
assert 'New Registrant User', RegistrantUser.last.username end
assert 'EE-51007050604', RegistrantUser.last.registrant_ident
end end
end end