kaui 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,13 @@
1
+ require 'test_helper'
2
+
3
+ class Kaui::BillCycleDayTest < ActiveSupport::TestCase
4
+ fixtures :bill_cycle_days
5
+
6
+ test "can serialize from json" do
7
+ as_json = bill_cycle_days(:the_sixth)
8
+ the_sixth = Kaui::BillCycleDay.new(as_json)
9
+
10
+ assert_equal as_json["dayOfMonthUTC"], the_sixth.day_of_month_utc
11
+ assert_equal as_json["dayOfMonthLocal"], the_sixth.day_of_month_local
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ require 'test_helper'
2
+
3
+ class Kaui::OverdueStateTest < ActiveSupport::TestCase
4
+ fixtures :overdue_states
5
+
6
+ test "can serialize from json" do
7
+ as_json = overdue_states(:od1)
8
+ od1 = Kaui::OverdueState.new(as_json)
9
+
10
+ assert_equal as_json["name"], od1.name
11
+ assert_equal as_json["externalMessage"], od1.external_message
12
+ assert_equal as_json["daysBetweenPaymentRetries"], od1.days_between_payment_retries
13
+ assert_equal as_json["disableEntitlementAndChangesBlocked"], od1.disable_entitlement_and_changes_blocked
14
+ assert_equal as_json["blockChanges"], od1.block_changes
15
+ assert_equal as_json["clearState"], od1.clear_state
16
+ assert_equal as_json["reevaluationIntervalDays"], od1.reevaluation_interval_days
17
+ end
18
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.10
5
+ version: 0.1.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alena Dudzinskaya
@@ -80,6 +80,7 @@ files:
80
80
  - app/models/kaui/external_payment.rb
81
81
  - app/models/kaui/invoice.rb
82
82
  - app/models/kaui/invoice_item.rb
83
+ - app/models/kaui/overdue_state.rb
83
84
  - app/models/kaui/payment.rb
84
85
  - app/models/kaui/payment_attempt.rb
85
86
  - app/models/kaui/payment_method.rb
@@ -200,6 +201,7 @@ files:
200
201
  - test/dummy/test/fixtures/bundles.yml
201
202
  - test/dummy/test/fixtures/invoice_items.yml
202
203
  - test/dummy/test/fixtures/invoices.yml
204
+ - test/dummy/test/fixtures/overdue_states.yml
203
205
  - test/dummy/test/fixtures/payment_methods.yml
204
206
  - test/dummy/test/fixtures/plugin_info_properties.yml
205
207
  - test/dummy/test/fixtures/plugin_infos.yml
@@ -216,6 +218,7 @@ files:
216
218
  - test/dummy/tmp/cache/assets/CEA/300/sprockets%2Fdf2ad5c9d0990441c2bf59883383d652
217
219
  - test/dummy/tmp/cache/assets/CEC/5B0/sprockets%2F1695e8510891108e3950e2a3e4fdf9df
218
220
  - test/dummy/tmp/cache/assets/CF7/710/sprockets%2F86d43448e1fc383cb6f3d752ef288882
221
+ - test/dummy/tmp/cache/assets/D04/1D0/sprockets%2F3baf64d90ead2434455d2296227ba8a2
219
222
  - test/dummy/tmp/cache/assets/D05/510/sprockets%2F1c14866e2401c27b0ff5e33d1b92c4e8
220
223
  - test/dummy/tmp/cache/assets/D07/DA0/sprockets%2Ffaad9b18203975dbf0c60f3234a51874
221
224
  - test/dummy/tmp/cache/assets/D17/DD0/sprockets%2F665455ecdc7609b23f4ecb366d86055a
@@ -227,6 +230,7 @@ files:
227
230
  - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
228
231
  - test/dummy/tmp/cache/assets/D6C/710/sprockets%2F1765773caead06c0a6a19ea9de2453f7
229
232
  - test/dummy/tmp/cache/assets/D76/910/sprockets%2Ff99b4bdc434e11e8634e6af62fe805e0
233
+ - test/dummy/tmp/cache/assets/D79/1E0/sprockets%2F97b08ebe07a73d8195ba124ffb45f98b
230
234
  - test/dummy/tmp/cache/assets/D9F/160/sprockets%2F510462e1ebd5dbb7ae20888b77f9bed2
231
235
  - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
232
236
  - test/dummy/tmp/cache/assets/DDF/650/sprockets%2Fbe16f0bf3d2b7af18010acbd53ba22f5
@@ -267,9 +271,11 @@ files:
267
271
  - test/unit/helpers/kaui/refunds_helper_test.rb
268
272
  - test/unit/kaui/account_test.rb
269
273
  - test/unit/kaui/base_test.rb
274
+ - test/unit/kaui/bill_cycle_day_test.rb
270
275
  - test/unit/kaui/date_helper_test.rb
271
276
  - test/unit/kaui/invoice_item_test.rb
272
277
  - test/unit/kaui/invoice_test.rb
278
+ - test/unit/kaui/overdue_state_test.rb
273
279
  - test/unit/kaui/payment_method_test.rb
274
280
  - test/unit/kaui/plugin_info_property_test.rb
275
281
  - test/unit/kaui/plugin_info_test.rb
@@ -343,6 +349,7 @@ test_files:
343
349
  - test/dummy/test/fixtures/bundles.yml
344
350
  - test/dummy/test/fixtures/invoice_items.yml
345
351
  - test/dummy/test/fixtures/invoices.yml
352
+ - test/dummy/test/fixtures/overdue_states.yml
346
353
  - test/dummy/test/fixtures/payment_methods.yml
347
354
  - test/dummy/test/fixtures/plugin_info_properties.yml
348
355
  - test/dummy/test/fixtures/plugin_infos.yml
@@ -359,6 +366,7 @@ test_files:
359
366
  - test/dummy/tmp/cache/assets/CEA/300/sprockets%2Fdf2ad5c9d0990441c2bf59883383d652
360
367
  - test/dummy/tmp/cache/assets/CEC/5B0/sprockets%2F1695e8510891108e3950e2a3e4fdf9df
361
368
  - test/dummy/tmp/cache/assets/CF7/710/sprockets%2F86d43448e1fc383cb6f3d752ef288882
369
+ - test/dummy/tmp/cache/assets/D04/1D0/sprockets%2F3baf64d90ead2434455d2296227ba8a2
362
370
  - test/dummy/tmp/cache/assets/D05/510/sprockets%2F1c14866e2401c27b0ff5e33d1b92c4e8
363
371
  - test/dummy/tmp/cache/assets/D07/DA0/sprockets%2Ffaad9b18203975dbf0c60f3234a51874
364
372
  - test/dummy/tmp/cache/assets/D17/DD0/sprockets%2F665455ecdc7609b23f4ecb366d86055a
@@ -370,6 +378,7 @@ test_files:
370
378
  - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
371
379
  - test/dummy/tmp/cache/assets/D6C/710/sprockets%2F1765773caead06c0a6a19ea9de2453f7
372
380
  - test/dummy/tmp/cache/assets/D76/910/sprockets%2Ff99b4bdc434e11e8634e6af62fe805e0
381
+ - test/dummy/tmp/cache/assets/D79/1E0/sprockets%2F97b08ebe07a73d8195ba124ffb45f98b
373
382
  - test/dummy/tmp/cache/assets/D9F/160/sprockets%2F510462e1ebd5dbb7ae20888b77f9bed2
374
383
  - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
375
384
  - test/dummy/tmp/cache/assets/DDF/650/sprockets%2Fbe16f0bf3d2b7af18010acbd53ba22f5
@@ -410,9 +419,11 @@ test_files:
410
419
  - test/unit/helpers/kaui/refunds_helper_test.rb
411
420
  - test/unit/kaui/account_test.rb
412
421
  - test/unit/kaui/base_test.rb
422
+ - test/unit/kaui/bill_cycle_day_test.rb
413
423
  - test/unit/kaui/date_helper_test.rb
414
424
  - test/unit/kaui/invoice_item_test.rb
415
425
  - test/unit/kaui/invoice_test.rb
426
+ - test/unit/kaui/overdue_state_test.rb
416
427
  - test/unit/kaui/payment_method_test.rb
417
428
  - test/unit/kaui/plugin_info_property_test.rb
418
429
  - test/unit/kaui/plugin_info_test.rb