king_dtaus 2.0.1.pre → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/spec/account_spec.rb CHANGED
@@ -5,189 +5,125 @@ describe KingDta::Account do
5
5
 
6
6
  before :each do
7
7
  @ba = test_kto2 # BankAccount mocked as open struct
8
- @dudes_konto = dudes_konto
9
8
  end
10
9
 
11
10
  it "should initialize a new account" do
12
- lambda{ KingDta::Account.new(:account_number => @ba.account_number, :bank_number => @ba.bank_number, :client_name => @ba.client_name) }.should_not raise_error
11
+ lambda{
12
+ KingDta::Account.new(:bank_account_number => @ba.bank_account_number,
13
+ :bank_number => @ba.bank_number,
14
+ :owner_name => @ba.owner_name)
15
+ }.should_not raise_error
13
16
  end
14
17
 
15
18
  it "should initialize a new dtazv account" do
16
- lambda{ KingDta::Account.new(
17
- :account_number => @dudes_konto.account_number,
18
- :bank_number => @dudes_konto.bank_number,
19
- :client_name => @dudes_konto.client_name,
20
- :client_number => @dudes_konto.client_number,
21
- :bank_street => @dudes_konto.account_street,
22
- :bank_city => @dudes_konto.account_city,
23
- :bank_zip_code => @dudes_konto.account_zip_code,
24
- :bank_name => @dudes_konto.bank_name,
25
- :client_street => @dudes_konto.client_street,
26
- :client_city => @dudes_konto.client_city,
27
- :client_zip_code => @dudes_konto.client_zip_code
28
- )}.should_not raise_error
19
+ lambda{
20
+ KingDta::Account.new(sender_opts)
21
+ }.should_not raise_error
22
+ end
23
+
24
+ it "should convert bank_account_number to integer" do
25
+ opts = {:bank_account_number => '0123456',
26
+ :bank_number => @ba.bank_number,
27
+ :owner_name => @ba.owner_name}
28
+ anct = KingDta::Account.new(opts)
29
+ anct.bank_account_number.should == 123456
30
+
31
+ anct2 = KingDta::Account.new(opts.merge(:bank_account_number=>'012 345 6'))
32
+ anct2.bank_account_number.should == 123456
33
+ end
34
+
35
+ it "should convert bank_number to integer" do
36
+ opts = {:bank_account_number => @ba.bank_account_number,
37
+ :bank_number => '0123',
38
+ :owner_name => @ba.owner_name}
39
+ anct = KingDta::Account.new(opts)
40
+ anct.bank_number.should == 123
41
+
42
+ anct2 = KingDta::Account.new(opts.merge(:bank_number=>'012 34 5'))
43
+ anct2.bank_number.should == 12345
29
44
  end
30
45
 
31
46
  it "should fail if bank account number is invalid" do
32
- # lambda{ KingDta::Account.new(0, @ba.bank_number, @ba.client_name) }.should raise_error(ArgumentError)
33
- lambda{ KingDta::Account.new(:account_number => 123456789011123456789011123456789011123456789011123456789011123456789011, :bank_number => @ba.bank_number, :client_name => @ba.client_name) }.should raise_error(ArgumentError, 'Account number too long, max 35 allowed')
47
+ lambda{
48
+ KingDta::Account.new(:bank_account_number => 123456789011123456789011123456789011,
49
+ :bank_number => @ba.bank_number,
50
+ :owner_name => @ba.owner_name)
51
+
52
+ }.should raise_error(ArgumentError, 'Bank account number too long, max 10 allowed')
34
53
  end
35
54
 
36
55
  it "should fail if bank number is invalid" do
37
- lambda{ KingDta::Account.new(:account_number => @ba.account_number, :bank_number => 0, :client_name => @ba.client_name) }.should raise_error(ArgumentError)
38
- lambda{ KingDta::Account.new(:account_number => @ba.account_number, :bank_number => 123456789101112, :client_name => @ba.client_name) }.should raise_error(ArgumentError, 'Bank number too long, max 11 allowed')
56
+ lambda{
57
+ KingDta::Account.new( :bank_account_number => @ba.bank_account_number,
58
+ :bank_number => 0,
59
+ :owner_name => @ba.owner_name)
60
+ }.should raise_error(ArgumentError)
61
+
62
+ lambda{
63
+ KingDta::Account.new( :bank_account_number => @ba.bank_account_number,
64
+ :bank_number => 123456789101112,
65
+ :owner_name => @ba.owner_name)
66
+ }.should raise_error(ArgumentError, 'Bank number too long, max 8 allowed')
39
67
  end
40
68
 
41
- it "should fail if clent number is too long" do
42
- lambda{ KingDta::Account.new(:account_number => @ba.account_number, :bank_number => @ba.bank_number, :client_name => @ba.client_name, :client_number => 12345678901) }.should raise_error(ArgumentError, 'Client number too long, max 10 allowed')
69
+ it "should fail if owner number is too long" do
70
+ lambda{
71
+ KingDta::Account.new( :bank_account_number => @ba.bank_account_number,
72
+ :bank_number => @ba.bank_number,
73
+ :owner_name => @ba.owner_name,
74
+ :owner_number => 12345678901)
75
+ }.should raise_error(ArgumentError, 'Owner number too long, max 10 allowed')
43
76
  end
44
77
 
45
78
  it "should fail if street and/or Zip Code is too long" do
46
- lambda{ KingDta::Account.new(
47
- :account_number => @dudes_konto.account_number,
48
- :bank_number => @dudes_konto.bank_number,
49
- :client_name => @dudes_konto.client_name,
50
- :client_number => @dudes_konto.client_number,
51
- :bank_street => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
52
- :bank_city => @dudes_konto.account_city,
53
- :bank_zip_code => @dudes_konto.account_zip_code,
54
- :bank_name => @dudes_konto.bank_name,
55
- :client_street => @dudes_konto.client_street,
56
- :client_city => @dudes_konto.client_city,
57
- :client_zip_code => @dudes_konto.client_zip_code
58
- )}.should raise_error(ArgumentError, 'Street and/or Zip Code too long, max 35 allowed')
79
+ opts = sender_opts.merge( :bank_street => "Lorem ipsum dolor sit amet, consectetur")
80
+ lambda{
81
+ KingDta::Account.new(opts)
82
+ }.should raise_error(ArgumentError, 'Bank street too long, max 35 allowed')
59
83
  end
60
84
 
61
85
  it "should fail if city is too long" do
62
- lambda{ KingDta::Account.new(
63
- :account_number => @dudes_konto.account_number,
64
- :bank_number => @dudes_konto.bank_number,
65
- :client_name => @dudes_konto.client_name,
66
- :client_number => @dudes_konto.client_number,
67
- :bank_street => @dudes_konto.account_street,
68
- :bank_city => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
69
- :bank_zip_code => @dudes_konto.account_zip_code,
70
- :bank_name => @dudes_konto.account_bank_name,
71
- :client_street => @dudes_konto.client_street,
72
- :client_city => @dudes_konto.client_city,
73
- :client_zip_code => @dudes_konto.client_zip_code
74
- )}.should raise_error(ArgumentError, 'City too long, max 35 allowed')
86
+ opts = sender_opts.merge( :bank_city => "Lorem ipsum dolor sit amet, consecte")
87
+ lambda{
88
+ KingDta::Account.new opts
89
+ }.should raise_error(ArgumentError, 'Bank city too long, max 35 allowed')
75
90
  end
76
91
 
77
92
  it "should fail if bank name is too long" do
78
- lambda{ KingDta::Account.new(
79
- :account_number => @dudes_konto.account_number,
80
- :bank_number => @dudes_konto.bank_number,
81
- :client_name => @dudes_konto.client_name,
82
- :client_number => @dudes_konto.client_number,
83
- :bank_street => @dudes_konto.account_street,
84
- :bank_city => @dudes_konto.account_city,
85
- :bank_zip_code => @dudes_konto.account_zip_code,
86
- :bank_name => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
87
- :client_street => @dudes_konto.client_street,
88
- :client_city => @dudes_konto.client_city,
89
- :client_zip_code => @dudes_konto.client_zip_code
90
- )}.should raise_error(ArgumentError, 'Bank Name too long, max 35 allowed')
91
- end
92
-
93
- it "should fail if sender street and/or zipcode is too long" do
94
- lambda{ KingDta::Account.new(
95
- :account_number => @dudes_konto.account_number,
96
- :bank_number => @dudes_konto.bank_number,
97
- :client_name => @dudes_konto.client_name,
98
- :client_number => @dudes_konto.client_number,
99
- :bank_street => @dudes_konto.account_street,
100
- :bank_city => @dudes_konto.account_city,
101
- :bank_zip_code => @dudes_konto.account_zip_code,
102
- :bank_name => @dudes_konto.bank_name,
103
- :client_street => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
104
- :client_city => @dudes_konto.client_city,
105
- :client_zip_code => @dudes_konto.client_zip_code
106
- )}.should raise_error(ArgumentError, 'Client Street and/or Zip Code too long, max 35 allowed')
93
+ opts = sender_opts.merge( :bank_name => "Lorem ipsum dolor sit amet, consecte")
94
+ lambda{
95
+ KingDta::Account.new opts
96
+ }.should raise_error(ArgumentError, 'Bank name too long, max 35 allowed')
97
+ end
98
+
99
+ it "should fail if client street is too long" do
100
+ opts = sender_opts.merge( :owner_street => "Lorem ipsum dolor sit amet, consecte")
101
+ lambda{
102
+ KingDta::Account.new opts
103
+ }.should raise_error(ArgumentError, 'Owner street too long, max 35 allowed')
107
104
  end
108
105
 
109
106
  it "should fail if city is too long" do
110
- lambda{ KingDta::Account.new(
111
- :account_number => @dudes_konto.account_number,
112
- :bank_number => @dudes_konto.bank_number,
113
- :client_name => @dudes_konto.client_name,
114
- :client_number => @dudes_konto.client_number,
115
- :bank_street => @dudes_konto.account_street,
116
- :bank_city => @dudes_konto.account_city,
117
- :bank_zip_code => @dudes_konto.account_zip_code,
118
- :bank_name => @dudes_konto.bank_name,
119
- :client_street => @dudes_konto.client_street,
120
- :client_city => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
121
- :client_zip_code => @dudes_konto.client_zip_code
122
- )}.should raise_error(ArgumentError, 'Client City too long, max 35 allowed')
107
+ opts = sender_opts.merge( :owner_city => "Lorem ipsum dolor sit amet, consecte")
108
+ lambda{
109
+ KingDta::Account.new opts
110
+ }.should raise_error(ArgumentError, 'Owner city too long, max 35 allowed')
123
111
  end
124
112
 
125
113
  it "should return account street and zip" do
126
- konto = KingDta::Account.new(
127
- :account_number => @dudes_konto.account_number,
128
- :bank_number => @dudes_konto.bank_number,
129
- :client_name => @dudes_konto.client_name,
130
- :client_number => @dudes_konto.client_number,
131
- :bank_street => @dudes_konto.account_street,
132
- :bank_city => @dudes_konto.account_city,
133
- :bank_zip_code => @dudes_konto.account_zip_code,
134
- :bank_name => @dudes_konto.bank_name,
135
- :client_street => @dudes_konto.client_street,
136
- :client_city => @dudes_konto.client_city,
137
- :client_zip_code => @dudes_konto.client_zip_code
138
- )
139
- konto.zip_city.should == "51063 BANK KOELN"
114
+ acnt = KingDta::Account.new( sender_opts )
115
+ acnt.bank_zip_city.should == "51063 BANK KOELN"
140
116
  end
141
117
 
142
118
  it "should return sender street and zip" do
143
- konto = KingDta::Account.new(
144
- :account_number => @dudes_konto.account_number,
145
- :bank_number => @dudes_konto.bank_number,
146
- :client_name => @dudes_konto.client_name,
147
- :client_number => @dudes_konto.client_number,
148
- :bank_street => @dudes_konto.account_street,
149
- :bank_city => @dudes_konto.account_city,
150
- :bank_zip_code => @dudes_konto.account_zip_code,
151
- :bank_name => @dudes_konto.bank_name,
152
- :client_street => @dudes_konto.client_street,
153
- :client_city => @dudes_konto.client_city,
154
- :client_zip_code => @dudes_konto.client_zip_code
155
- )
156
- konto.client_zip_city.should == "51063 MEINE KOELN"
157
- end
158
-
159
- it "should return sender name1 - the first 35 characters of a name" do
160
- konto = KingDta::Account.new(
161
- :account_number => @dudes_konto.account_number,
162
- :bank_number => @dudes_konto.bank_number,
163
- :client_name => @dudes_konto.client_name,
164
- :client_number => @dudes_konto.client_number,
165
- :bank_street => @dudes_konto.account_street,
166
- :bank_city => @dudes_konto.account_city,
167
- :bank_zip_code => @dudes_konto.account_zip_code,
168
- :bank_name => @dudes_konto.bank_name,
169
- :client_street => @dudes_konto.client_street,
170
- :client_city => @dudes_konto.client_city,
171
- :client_zip_code => @dudes_konto.client_zip_code
172
- )
173
- konto.client_name_1.should == "JAN KUS"
174
- end
175
-
176
- it "should return sender name1 - the characters 36 - 70 of a name" do
177
- konto = KingDta::Account.new(
178
- :account_number => @dudes_konto.account_number,
179
- :bank_number => @dudes_konto.bank_number,
180
- :client_name => @dudes_konto.client_name,
181
- :client_number => @dudes_konto.client_number,
182
- :bank_street => @dudes_konto.account_street,
183
- :bank_city => @dudes_konto.account_city,
184
- :bank_zip_code => @dudes_konto.account_zip_code,
185
- :bank_name => @dudes_konto.bank_name,
186
- :client_street => @dudes_konto.client_street,
187
- :client_city => @dudes_konto.client_city,
188
- :client_zip_code => @dudes_konto.client_zip_code
189
- )
190
- konto.client_name_2.should == nil
191
- end
192
-
193
- end
119
+ acnt = KingDta::Account.new( sender_opts )
120
+ acnt.owner_zip_city.should == "51063 MEINE KOELN"
121
+ end
122
+
123
+ it "should set owner country code from iban" do
124
+ opts = receiver_opts
125
+ opts[:owner_country_code] = nil
126
+ acnt = KingDta::Account.new( opts )
127
+ acnt.owner_country_code.should == "PL"
128
+ end
129
+ end
data/spec/booking_spec.rb CHANGED
@@ -4,9 +4,7 @@ require 'spec_helper'
4
4
  describe KingDta::Booking do
5
5
 
6
6
  before :each do
7
- kto1 = test_kto1
8
- kto2 = test_kto2
9
- @account = KingDta::Account.new(:account_number => kto2.account_number, :bank_number => kto2.bank_number, :client_name => kto2.client_name, :bank_name => kto2.bank_name )
7
+ @account = KingDta::Account.new(receiver_opts)
10
8
  end
11
9
 
12
10
  it "should have no rounding error for string" do
data/spec/dtaus_spec.rb CHANGED
@@ -8,9 +8,9 @@ describe KingDta::Dtaus do
8
8
  @dtaus_gk = KingDta::Dtaus.new('GK', Date.today)
9
9
  @kto1 = test_kto1
10
10
  @kto2 = test_kto2
11
- @dtaus.account = KingDta::Account.new(:account_number => @kto1.account_number, :bank_number => @kto1.bank_number, :client_name => @kto1.client_name, :bank_name => @kto1.bank_name)
12
- @dtaus_gk.account = KingDta::Account.new(:account_number => @kto1.account_number, :bank_number => @kto1.bank_number, :client_name => @kto1.client_name, :bank_name => @kto1.bank_name)
13
- @booking = KingDta::Booking.new(KingDta::Account.new(:account_number => @kto2.account_number, :bank_number => @kto2.bank_number, :client_name => @kto2.client_name, :bank_name => @kto2.bank_name), 220.25 )
11
+ @dtaus.account = KingDta::Account.new(:bank_account_number => @kto1.bank_account_number, :bank_number => @kto1.bank_number, :owner_name => @kto1.owner_name, :bank_name => @kto1.bank_name)
12
+ @dtaus_gk.account = KingDta::Account.new(:bank_account_number => @kto1.bank_account_number, :bank_number => @kto1.bank_number, :owner_name => @kto1.owner_name, :bank_name => @kto1.bank_name)
13
+ @booking = KingDta::Booking.new(KingDta::Account.new(:bank_account_number => @kto2.bank_account_number, :bank_number => @kto2.bank_number, :owner_name => @kto2.owner_name, :bank_name => @kto2.bank_name), 220.25 )
14
14
  end
15
15
 
16
16
  it "should not init without values" do
@@ -41,7 +41,7 @@ describe KingDta::Dtaus do
41
41
 
42
42
  it "should not add a booking if closed" do
43
43
  @dtaus.add(@booking)
44
- negative_booking = KingDta::Booking.new(KingDta::Account.new(:account_number => @kto2.account_number, :bank_number => @kto2.bank_number, :client_name => @kto2.client_name, :bank_name => @kto2.bank_name ), -120.25 )
44
+ negative_booking = KingDta::Booking.new(KingDta::Account.new(:bank_account_number => @kto2.bank_account_number, :bank_number => @kto2.bank_number, :owner_name => @kto2.owner_name, :bank_name => @kto2.bank_name ), -120.25 )
45
45
  lambda{ @dtaus.add(negative_booking) }.should raise_error(KingDta::Exception)
46
46
  end
47
47
 
@@ -55,7 +55,7 @@ describe KingDta::Dtaus do
55
55
  out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"
56
56
  str.should == out
57
57
  #60-70 kontonummer mit nullen aufgefüllt - hier nicht da ktnr == 10 stellen
58
- str[60...70].should == "#{test_kto1.account_number}"
58
+ str[60...70].should == "#{test_kto1.bank_account_number}"
59
59
  str.should include(test_kto1.bank_number)
60
60
  end
61
61
 
@@ -85,17 +85,31 @@ describe KingDta::Dtaus do
85
85
  @dtaus.add_c(@booking)
86
86
  str = @dtaus.dta_string
87
87
  str.length.should == 256
88
- str.should include(@kto2.client_name.upcase)
88
+ str.should include(@kto2.owner_name.upcase)
89
89
  out = "0216C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGSALESKING MONATSBEITRAG 08/1 010210 FREELANCER VERSION "
90
90
  str.should == out
91
91
  end
92
92
 
93
+ it "should create c-sektion with long account owner name in extension" do
94
+ @dtaus.account = KingDta::Account.new(:bank_account_number => @kto1.bank_account_number, :bank_number => @kto1.bank_number,
95
+ :owner_name => 'A very long name exeeding 27 characters even longer 54 chars', :bank_name => @kto1.bank_name)
96
+
97
+ @dtaus.add(@booking)
98
+ @dtaus.bookings.first.text = 'SalesKing Monatsbeitrag 08/10 Freelancer Version'
99
+ @dtaus.add_c(@booking)
100
+ str = @dtaus.dta_string
101
+ str.length.should == 256
102
+ str.should include(@kto2.owner_name.upcase)
103
+ out = "0245C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH A VERY LONG NAME EXEEDING 2SALESKING MONATSBEITRAG 08/1 020210 FREELANCER VERSION 037 CHARACTERS EVEN LONGER 54 "
104
+ str.should == out
105
+ end
106
+
93
107
  it "should create c-sektion with default booking text" do
94
108
  @dtaus.default_text = 'Default verwendungszweck'
95
109
  @dtaus.add_c(@booking)
96
110
  str = @dtaus.dta_string
97
111
  str.length.should == 256
98
- str.should include(@kto2.client_name.upcase)
112
+ str.should include(@kto2.owner_name.upcase)
99
113
  out = "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "
100
114
  str.should == out
101
115
  end
@@ -105,8 +119,8 @@ describe KingDta::Dtaus do
105
119
  @dtaus.add(@booking)
106
120
  str = @dtaus.create
107
121
  str.length.should == 512
108
- str.should include(@kto1.client_name.upcase)
109
- str.should include(@kto2.client_name.upcase)
122
+ str.should include(@kto1.owner_name.upcase)
123
+ str.should include(@kto2.owner_name.upcase)
110
124
  str.should include(@dtaus.default_text.upcase)
111
125
  out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"+
112
126
  "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+
@@ -114,12 +128,21 @@ describe KingDta::Dtaus do
114
128
  str.should == out
115
129
  end
116
130
 
131
+ it "should create whole dta string with long texts exeeding extension" do
132
+ @dtaus.account = KingDta::Account.new(:bank_account_number => @kto1.bank_account_number, :bank_number => @kto1.bank_number,
133
+ :owner_name => 'A very long name exeeding 27 characters even longer 54 chars', :bank_name => @kto1.bank_name)
134
+ @dtaus.add(@booking)
135
+ @dtaus.bookings.first.text = 'Rgn R-3456-0102220 Monatsbeitrag 08/10 Freelancer Version Vielen Dank Ihre SalesKing GmbH' * 20
136
+ @dtaus.bookings.first.account.owner_name = 'A very long name exeeding 27 characters even longer 54 chars'
137
+ str = @dtaus.create ## should not raise error
138
+ end
139
+
117
140
  it "should create whole dta string with long booking text in extension" do
118
141
  @dtaus.add(@booking)
119
142
  @dtaus.bookings.first.text = 'Rgn R-3456-0102220 Monatsbeitrag 08/10 Freelancer Version Vielen Dank Ihre SalesKing GmbH'
120
143
  str = @dtaus.create
121
144
  str.length.should == 640
122
- str.should include(@kto2.client_name.upcase)
145
+ str.should include(@kto2.owner_name.upcase)
123
146
  out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"+
124
147
  "0274C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGRGN R-3456-0102220 MONATSBE1 0302ITRAG 08/10 FREELANCER VERS02ION VIELEN DANK IHRE SALESK 02ING GMBH "+
125
148
  "0128E 0000001000000000000000000000002787777000000000370400440000000022025 "
@@ -131,8 +154,8 @@ describe KingDta::Dtaus do
131
154
  6.times { @dtaus.add(@booking) }
132
155
  str = @dtaus.create
133
156
  str.length.should == 1792
134
- str.should include(@kto1.client_name.upcase)
135
- str.should include(@kto2.client_name.upcase)
157
+ str.should include(@kto1.owner_name.upcase)
158
+ str.should include(@kto2.owner_name.upcase)
136
159
  str.should include(@dtaus.default_text.upcase)
137
160
  out = "0128ALK3704004400000000GIMME YOUR MONEY AG #{Date.today.strftime("%d%m%y")} 78289700370000000000 #{Date.today.strftime("%d%m%Y")} 1"+
138
161
  "0187C00000000370400440002787777000000000000005000 0000000000037040044782897003700000022025 PETER & MAY GMBH GIMME YOUR MONEY AGDEFAULT VERWENDUNGSZWECK 1 00 "+