class NewUserCanSignupTest < ActionController::IntegrationTest
context 'a site visitor' do
setup do
[{ :country => "Albania", :name => "Leke", :code => "ALL", :html_entity => "Lek", :priority => false },
{ :country => "America (United States of America)", :name => "Dollars", :code => "USD", :html_entity => "$", :priority => true }].each { |c| Currency.create(c) }
create_default_chart_of_accounts
bootstrap_iacez
end
should 'be able to create a new account' do
visit new_account_path
fill_in 'login', :with => 'disney'
fill_in 'organization', :with => 'Disney'
fill_in 'website', :with => 'disney.com'
fill_in 'address', :with => '2100 Riverside Drive'
fill_in 'city', :with => 'Burbank'
select 'California', :from => 'state'
select 'California', :from => 'tax_state'
select 'United States of America', :from => 'country'
fill_in 'postalcode', :with => '91506-2947'
fill_in 'phone_number', :with => '(818) 560-9662'
select option_text('(GMT-08:00) Pacific Time (US & Canada)'), :from => 'company_time_zone'
select 'Dollars (USD) $', :from => 'currency_id'
select 'dd/mm/yy', :from => 'date_format'
select 'C-Corporation', :from => 'ownership_type'
select 'Annually', :from => 'sales_tax_interval'
fill_in 'First name', :with => 'Mickey'
fill_in 'Last name', :with => 'Mouse'
fill_in 'Username', :with => 'mickey'
fill_in 'Email', :with => 'mickey@disney.com'
fill_in 'Password', :with => 'sekrit'
fill_in 'Confirm New Password', :with => 'sekrit'
check 'user_understand_bookkeeping'
check 'user_tos_accept'
click_button 'Register'
assert_contain 'Your account has been created'
end
end
end