mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Merge pull request #1202 from internetee/improve-registrar-area-account-view
Improve registrar area account view
This commit is contained in:
commit
7b7a87348b
18 changed files with 137 additions and 56 deletions
22
test/system/registrar_area/account_test.rb
Normal file
22
test/system/registrar_area/account_test.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
require 'test_helper'
|
||||
|
||||
class RegistrarAccountTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@registrar = registrars(:bestnames)
|
||||
sign_in users(:api_bestnames)
|
||||
end
|
||||
|
||||
def test_updates_account
|
||||
new_billing_email = 'new@registrar.test'
|
||||
assert_not_equal new_billing_email, @registrar.billing_email
|
||||
|
||||
visit registrar_account_path
|
||||
click_on 'Edit'
|
||||
|
||||
fill_in 'Billing email', with: new_billing_email
|
||||
click_on 'Save changes'
|
||||
|
||||
assert_text 'Your account has been updated'
|
||||
assert_text new_billing_email
|
||||
end
|
||||
end
|
|
@ -17,10 +17,10 @@ class RegistrarAreaPasswordSignInTest < ApplicationSystemTestCase
|
|||
assert_current_path registrar_root_path
|
||||
end
|
||||
|
||||
def test_after_successful_sign_in_billing_user_sees_profile
|
||||
def test_after_successful_sign_in_billing_user_sees_account
|
||||
@user.update!(roles: [ApiUser::BILLING])
|
||||
login_with_correct_credentials
|
||||
assert_current_path registrar_profile_path
|
||||
assert_current_path registrar_account_path
|
||||
end
|
||||
|
||||
def test_wrong_password
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue