ffmike (owner)

Revisions

gist: 190470 Download_button fork
public
Public Clone URL: git://gist.github.com/190470.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class NewUserCanSignupTest < ActionController::IntegrationTest
  context 'a site visitor' do
    setup do
      [{ :country => "Albania", :name => "Leke", :code => "ALL", :html_entity => "&#76;&#101;&#107;", :priority => false },
       { :country => "America (United States of America)", :name => "Dollars", :code => "USD", :html_entity => "&#36;", :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