bloom_remit 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,6 @@ RSpec.describe "api/v1/txns" do
23
23
  }.to_json,
24
24
  headers
25
25
  )
26
- puts response.body
27
26
  expect(response.status).to be 404
28
27
 
29
28
  post(
@@ -3,6 +3,8 @@ require 'rails_helper'
3
3
  module BloomRemit
4
4
  RSpec.describe CreateTxn, vcr: {record: :once} do
5
5
 
6
+ let(:external_id) { SecureRandom.hex(12) }
7
+
6
8
  it "creates a model and pays for the bill" do
7
9
  BloomRemit.configure do |c|
8
10
  c.token = ENV["BLOOM_REMIT_TOKEN"]
@@ -22,6 +24,7 @@ module BloomRemit
22
24
  account_name: "028109090",
23
25
  account_id: "Hooli X",
24
26
  owner: payment,
27
+ external_id: external_id,
25
28
  ).model
26
29
 
27
30
  expect(txn).to be_incomplete
@@ -30,6 +33,7 @@ module BloomRemit
30
33
  expect(txn.sender_id).to eq user.id.to_s
31
34
  expect(txn.owner_type).to eq "Payment"
32
35
  expect(txn.owner_id).to eq payment.id.to_s
36
+ expect(txn.external_id).to eq external_id
33
37
  end
34
38
 
35
39
  end
@@ -7,6 +7,7 @@ module BloomRemit
7
7
  let(:user) do
8
8
  build_stubbed(:bloom_remit_dummy_user, bloom_remit_id: "sender-id")
9
9
  end
10
+ let(:external_id) { SecureRandom.hex(12) }
10
11
  let(:txn) do
11
12
  build_stubbed(:bloom_remit_txn, {
12
13
  target_slug: "PLDT",
@@ -14,6 +15,7 @@ module BloomRemit
14
15
  amount: BigDecimal.new(2000),
15
16
  account_name: "029925252",
16
17
  account_id: "12345678",
18
+ external_id: external_id,
17
19
  })
18
20
  end
19
21
  let(:callback_url) do
@@ -33,6 +35,7 @@ module BloomRemit
33
35
  payout_method: "PLDT",
34
36
  paid_in_orig_currency: BigDecimal.new(2000),
35
37
  receivable_in_dest_currency: BigDecimal.new(2000),
38
+ external_id: external_id,
36
39
  ).and_return(response)
37
40
 
38
41
  resulting_ctx = described_class.execute(txn: txn, client: client)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
@@ -382,6 +382,7 @@ files:
382
382
  - db/migrate/20160805040950_add_owner_to_bloom_remit_txns.rb
383
383
  - db/migrate/20160805095308_change_txns_sender_id_to_string.rb
384
384
  - db/migrate/20160806054012_create_bloom_remit_responses.rb
385
+ - db/migrate/20160808081300_add_external_id_to_txns.rb
385
386
  - lib/bloom_remit.rb
386
387
  - lib/bloom_remit/engine.rb
387
388
  - lib/bloom_remit/factories.rb
@@ -390,6 +391,7 @@ files:
390
391
  - lib/bloom_remit/version.rb
391
392
  - lib/tasks/bloom_remit_tasks.rake
392
393
  - spec/bloom_remit_spec.rb
394
+ - spec/concepts/bloom_remit/txns/contracts/create_spec.rb
393
395
  - spec/concepts/bloom_remit/txns/operations/create_spec.rb
394
396
  - spec/concepts/bloom_remit/txns/operations/update_spec.rb
395
397
  - spec/dummy/README.rdoc
@@ -495,6 +497,7 @@ specification_version: 4
495
497
  summary: Rails engine for Bloom Remit users
496
498
  test_files:
497
499
  - spec/bloom_remit_spec.rb
500
+ - spec/concepts/bloom_remit/txns/contracts/create_spec.rb
498
501
  - spec/concepts/bloom_remit/txns/operations/create_spec.rb
499
502
  - spec/concepts/bloom_remit/txns/operations/update_spec.rb
500
503
  - spec/dummy/app/assets/javascripts/application.js