Add test & error message if not enough funds for renew

This commit is contained in:
Alex Sherman 2020-12-15 16:43:37 +05:00
parent 95a789ab60
commit 13455b398c
3 changed files with 17 additions and 0 deletions

View file

@ -37,4 +37,19 @@ class BulkRenewTest < ApplicationSystemTestCase
assert_text 'invalid.test'
assert_no_text 'shop.test'
end
def test_bulk_renew_checks_balance
sign_in users(:api_bestnames)
@price.update(price_cents: 99999999)
travel_to Time.zone.parse('2010-07-05 10:30')
visit new_registrar_bulk_change_url
click_link('Bulk renew')
select '1 year', from: 'Period'
click_button 'Filter'
click_button 'Renew'
assert_text 'Not enough funds for renew domains'
end
end