mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Move test to separate file
This commit is contained in:
parent
3198538556
commit
2ca0438274
2 changed files with 26 additions and 23 deletions
26
test/system/registrar_area/bulk_change/bulk_renew_test.rb
Normal file
26
test/system/registrar_area/bulk_change/bulk_renew_test.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
require 'application_system_test_case'
|
||||
|
||||
class BulkRenewTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@registrar = users(:api_bestnames).registrar
|
||||
@price = billing_prices(:renew_one_year)
|
||||
end
|
||||
|
||||
def test_mass_renewal
|
||||
sign_in users(:api_bestnames)
|
||||
travel_to Time.zone.parse('2010-07-05 10:30')
|
||||
|
||||
visit new_registrar_bulk_change_url
|
||||
click_link('Bulk renew')
|
||||
assert_text 'Current balance'
|
||||
page.has_css?('#registrar_balance', text:
|
||||
ApplicationController.helpers.number_to_currency(@registrar.balance))
|
||||
|
||||
select '1 year', from: 'Period'
|
||||
click_button 'Filter'
|
||||
|
||||
@registrar.domains.pluck(:name).each do |domain_name|
|
||||
assert_text domain_name
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,11 +1,6 @@
|
|||
require 'application_system_test_case'
|
||||
|
||||
class RegistrarDomainsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@registrar = users(:api_bestnames).registrar
|
||||
@price = billing_prices(:renew_one_year)
|
||||
end
|
||||
|
||||
def test_downloads_domain_list_as_csv
|
||||
sign_in users(:api_bestnames)
|
||||
travel_to Time.zone.parse('2010-07-05 10:30')
|
||||
|
@ -23,22 +18,4 @@ class RegistrarDomainsTest < ApplicationSystemTestCase
|
|||
assert_equal "attachment; filename=\"Domains_2010-07-05_10.30.csv\"; filename*=UTF-8''Domains_2010-07-05_10.30.csv", response_headers['Content-Disposition']
|
||||
assert_equal expected_csv, page.body
|
||||
end
|
||||
|
||||
def test_mass_renewal
|
||||
sign_in users(:api_bestnames)
|
||||
travel_to Time.zone.parse('2010-07-05 10:30')
|
||||
|
||||
visit new_registrar_bulk_change_url
|
||||
click_link('Bulk renew')
|
||||
assert_text 'Current balance'
|
||||
page.has_css?('#registrar_balance', text:
|
||||
ApplicationController.helpers.number_to_currency(@registrar.balance))
|
||||
|
||||
select '1 year', from: 'Period'
|
||||
click_button 'Filter'
|
||||
|
||||
@registrar.domains.pluck(:name).each do |domain_name|
|
||||
assert_text domain_name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue