mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
added tests
This commit is contained in:
parent
2ff049707d
commit
6f5cd11859
2 changed files with 14 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
en:
|
||||
edit_balance: Edit balance
|
||||
admin:
|
||||
accounts:
|
||||
index:
|
||||
|
@ -16,6 +17,3 @@ en:
|
|||
registrar_name: Registrar
|
||||
reset_btn: Reset
|
||||
download_csv_btn: CSV
|
||||
|
||||
account:
|
||||
edit_balance: Edit balance
|
||||
|
|
|
@ -3,6 +3,7 @@ require 'application_system_test_case'
|
|||
class AdminAccountsSystemTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
sign_in users(:admin)
|
||||
@account = registrars(:bestnames).cash_account
|
||||
end
|
||||
|
||||
def test_download_accounts
|
||||
|
@ -17,4 +18,16 @@ class AdminAccountsSystemTest < ApplicationSystemTestCase
|
|||
response.headers['Content-Disposition']
|
||||
assert_not_empty response.body
|
||||
end
|
||||
|
||||
def test_change_account_balance
|
||||
puts @account.inspect
|
||||
visit edit_admin_account_path(@account)
|
||||
assert_button 'Save'
|
||||
assert_field 'Balance'
|
||||
fill_in 'Balance', with: '234'
|
||||
click_on 'Save'
|
||||
|
||||
assert_text 'Account has been successfully updated'
|
||||
assert_text '234'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue