mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +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:
|
en:
|
||||||
|
edit_balance: Edit balance
|
||||||
admin:
|
admin:
|
||||||
accounts:
|
accounts:
|
||||||
index:
|
index:
|
||||||
|
@ -16,6 +17,3 @@ en:
|
||||||
registrar_name: Registrar
|
registrar_name: Registrar
|
||||||
reset_btn: Reset
|
reset_btn: Reset
|
||||||
download_csv_btn: CSV
|
download_csv_btn: CSV
|
||||||
|
|
||||||
account:
|
|
||||||
edit_balance: Edit balance
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ require 'application_system_test_case'
|
||||||
class AdminAccountsSystemTest < ApplicationSystemTestCase
|
class AdminAccountsSystemTest < ApplicationSystemTestCase
|
||||||
setup do
|
setup do
|
||||||
sign_in users(:admin)
|
sign_in users(:admin)
|
||||||
|
@account = registrars(:bestnames).cash_account
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_download_accounts
|
def test_download_accounts
|
||||||
|
@ -17,4 +18,16 @@ class AdminAccountsSystemTest < ApplicationSystemTestCase
|
||||||
response.headers['Content-Disposition']
|
response.headers['Content-Disposition']
|
||||||
assert_not_empty response.body
|
assert_not_empty response.body
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue