bloom_remit 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6633a573a1b8a38fc9d598c4219e1c5812b25830
4
- data.tar.gz: ccb6ca14dd2e3f74872dd716b641d7ef773768d2
3
+ metadata.gz: 7cdb2c2f7b353f74026d084ec937cf4ef0b01eb6
4
+ data.tar.gz: a956e34dc807d9026f2101368d8979f34028acea
5
5
  SHA512:
6
- metadata.gz: 1a2996c28b598aefb690f642f9d8a3994061df7d61f1b72de36ffb085d675489104c8bf99d1c5b3da4f7e4bb04f4a742d330276fa3dcb7b709c84bc64bd7e727
7
- data.tar.gz: fa3848e1a9d9f33ebb20569a40d709687daad47e64b62dae75936897c3800c670e1231268aea47953fff985be61a0aaed5a3b0a48c0f2c1cca7c882f769b38fd
6
+ metadata.gz: 8e7cf8fe8cdbed00df092ff1bdeb92a4159941cfcf058035e4c43cc18bb8efcdcf9d21f832734d323fe414b8ebab870cd41ada3b7044b23cfd5b7f266658a421
7
+ data.tar.gz: dd01c5c43a22a472ee13c8b9c076e2f6db7d2954838a0329c63202bcf4f7ef3daa0171ffc36968b6c9762bd5db7eb6ceccd3f24c84f1d8ee6a616ed829bdddb0
@@ -7,7 +7,9 @@ module BloomRemit
7
7
  promises :response
8
8
 
9
9
  executed do |c|
10
- body = c.remote_response.body
10
+ remote_response = c.remote_response
11
+ c.txn.error! unless remote_response.success?
12
+ body = remote_response.body
11
13
  c.response = c.txn.responses.create!(body: body)
12
14
  end
13
15
 
@@ -1,3 +1,3 @@
1
1
  module BloomRemit
2
- VERSION = "0.6.1"
2
+ VERSION = "0.7.0"
3
3
  end
@@ -1,16 +1,13 @@
1
1
  ---
2
- defaults: &defaults
3
- username: ubuntu
4
- password:
5
-
6
- development:
7
- <<: *defaults
2
+ development: &default
8
3
  adapter: postgresql
9
4
  encoding: unicode
10
- database: bloom_remit_rails_development
5
+ database: postgres
6
+ pool: 5
7
+ username: postgres
8
+ password:
9
+ host: db
11
10
 
12
11
  test:
13
- <<: *defaults
14
- adapter: postgresql
15
- encoding: unicode
16
- database: bloom_remit_rails_test
12
+ <<: *default
13
+ database: app_test
@@ -1,16 +1,13 @@
1
1
  ---
2
- defaults: &defaults
3
- username: ubuntu
4
- password:
5
-
6
- development:
7
- <<: *defaults
2
+ development: &default
8
3
  adapter: postgresql
9
4
  encoding: unicode
10
- database: bloom_remit_rails_development
5
+ database: postgres
6
+ pool: 5
7
+ username: postgres
8
+ password:
9
+ host: db
11
10
 
12
11
  test:
13
- <<: *defaults
14
- adapter: postgresql
15
- encoding: unicode
16
- database: bloom_remit_rails_test
12
+ <<: *default
13
+ database: app_test
@@ -15,22 +15,11 @@ ActiveRecord::Schema.define(version: 20160817003323) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
18
- enable_extension "hstore"
19
18
 
20
19
  create_table "billers", force: :cascade do |t|
21
20
  t.string "slug"
22
21
  end
23
22
 
24
- create_table "bloom_remit_billers", force: :cascade do |t|
25
- t.string "slug", null: false
26
- t.text "description"
27
- t.hstore "fields"
28
- t.decimal "service_charge", default: 0.0, null: false
29
- t.datetime "deactivated_at"
30
- t.datetime "created_at", null: false
31
- t.datetime "updated_at", null: false
32
- end
33
-
34
23
  create_table "bloom_remit_responses", force: :cascade do |t|
35
24
  t.integer "txn_id", null: false
36
25
  t.text "body", null: false
@@ -30634,3 +30634,874 @@ Completed 204 No Content in 37ms (ActiveRecord: 1.4ms)
30634
30634
   (0.2ms) COMMIT
30635
30635
   (0.2ms) BEGIN
30636
30636
   (0.2ms) ROLLBACK
30637
+ SQL (1.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
30638
+ SQL (21.5ms) CREATE EXTENSION IF NOT EXISTS "hstore"
30639
+  (12.1ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying) 
30640
+  (5.8ms) CREATE TABLE "bloom_remit_billers" ("id" serial primary key, "slug" character varying NOT NULL, "description" text, "fields" hstore, "service_charge" decimal DEFAULT 0.0 NOT NULL, "deactivated_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
30641
+  (8.5ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
30642
+  (3.5ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" USING btree ("txn_id")
30643
+  (11.6ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "sender_id" character varying NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL, "target_slug" character varying NOT NULL, "owner_id" character varying, "owner_type" character varying, "external_id" character varying NOT NULL, "status_description" text, "vendor_external_id" character varying) 
30644
+  (4.3ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" USING btree ("external_id")
30645
+  (3.9ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" USING btree ("owner_id", "owner_type")
30646
+  (5.0ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" USING btree ("vendor_external_id")
30647
+  (6.1ms) CREATE TABLE "payments" ("id" serial primary key, "type" character varying) 
30648
+  (9.3ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying, "type" character varying)
30649
+  (5.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
30650
+  (2.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30651
+  (0.7ms) SELECT version FROM "schema_migrations"
30652
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160817003323')
30653
+  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160729085500')
30654
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805001840')
30655
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20160805042105')
30656
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806011259')
30657
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160806012210')
30658
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30659
+  (2.1ms) DROP DATABASE IF EXISTS "postgres"
30660
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30661
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
30662
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
30663
+  (2.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30664
+ FROM pg_constraint c
30665
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30666
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30667
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30668
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30669
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30670
+ WHERE c.contype = 'f'
30671
+ AND t1.relname = 'billers'
30672
+ AND t3.nspname = ANY (current_schemas(false))
30673
+ ORDER BY c.conname
30674
+ 
30675
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30676
+ FROM pg_constraint c
30677
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30678
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30679
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30680
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30681
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30682
+ WHERE c.contype = 'f'
30683
+ AND t1.relname = 'bloom_remit_billers'
30684
+ AND t3.nspname = ANY (current_schemas(false))
30685
+ ORDER BY c.conname
30686
+
30687
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30688
+ FROM pg_constraint c
30689
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30690
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30691
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30692
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30693
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30694
+ WHERE c.contype = 'f'
30695
+ AND t1.relname = 'bloom_remit_responses'
30696
+ AND t3.nspname = ANY (current_schemas(false))
30697
+ ORDER BY c.conname
30698
+ 
30699
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30700
+ FROM pg_constraint c
30701
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30702
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30703
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30704
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30705
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30706
+ WHERE c.contype = 'f'
30707
+ AND t1.relname = 'bloom_remit_txns'
30708
+ AND t3.nspname = ANY (current_schemas(false))
30709
+ ORDER BY c.conname
30710
+
30711
+  (2.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30712
+ FROM pg_constraint c
30713
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30714
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30715
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30716
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30717
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30718
+ WHERE c.contype = 'f'
30719
+ AND t1.relname = 'payments'
30720
+ AND t3.nspname = ANY (current_schemas(false))
30721
+ ORDER BY c.conname
30722
+ 
30723
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30724
+ FROM pg_constraint c
30725
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30726
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30727
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30728
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30729
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30730
+ WHERE c.contype = 'f'
30731
+ AND t1.relname = 'users'
30732
+ AND t3.nspname = ANY (current_schemas(false))
30733
+ ORDER BY c.conname
30734
+
30735
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30736
+  (0.9ms) DROP DATABASE IF EXISTS "postgres"
30737
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30738
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
30739
+  (0.9ms) DROP DATABASE IF EXISTS "postgres"
30740
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30741
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30742
+ Migrating to CreateBloomRemitTxns (20160729070509)
30743
+  (0.3ms) BEGIN
30744
+  (2.4ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "recipient_type" character varying NOT NULL, "recipient_id" character varying NOT NULL, "sender_id" integer NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL) 
30745
+  (0.3ms) ROLLBACK
30746
+  (5.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
30747
+  (2.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
30748
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
30749
+ Migrating to CreateBloomRemitTxns (20160729070509)
30750
+  (0.2ms) BEGIN
30751
+  (7.4ms) CREATE TABLE "bloom_remit_txns" ("id" serial primary key, "status" integer DEFAULT 0 NOT NULL, "recipient_type" character varying NOT NULL, "recipient_id" character varying NOT NULL, "sender_id" integer NOT NULL, "sender_type" character varying NOT NULL, "amount" decimal NOT NULL, "account_name" character varying, "account_id" character varying, "secret" uuid NOT NULL) 
30752
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729070509"]]
30753
+  (1.4ms) COMMIT
30754
+ Migrating to CreateUsers (20160729085500)
30755
+  (0.2ms) BEGIN
30756
+  (6.4ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "bloom_remit_id" character varying) 
30757
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160729085500"]]
30758
+  (1.3ms) COMMIT
30759
+ Migrating to CreateBillers (20160805001840)
30760
+  (0.3ms) BEGIN
30761
+  (8.1ms) CREATE TABLE "billers" ("id" serial primary key, "slug" character varying) 
30762
+ SQL (0.8ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805001840"]]
30763
+  (1.1ms) COMMIT
30764
+ Migrating to DropRecipientFromTxns (20160805004223)
30765
+  (0.2ms) BEGIN
30766
+  (1.1ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_id"
30767
+  (0.7ms) ALTER TABLE "bloom_remit_txns" DROP "recipient_type"
30768
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004223"]]
30769
+  (0.9ms) COMMIT
30770
+ Migrating to AddTargetSlugToBloomRemitTxns (20160805004350)
30771
+  (0.2ms) BEGIN
30772
+  (0.9ms) ALTER TABLE "bloom_remit_txns" ADD "target_slug" character varying NOT NULL
30773
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805004350"]]
30774
+  (0.7ms) COMMIT
30775
+ Migrating to AddOwnerToBloomRemitTxns (20160805040950)
30776
+  (0.6ms) BEGIN
30777
+  (0.9ms) ALTER TABLE "bloom_remit_txns" ADD "owner_id" character varying
30778
+  (0.5ms) ALTER TABLE "bloom_remit_txns" ADD "owner_type" character varying
30779
+  (3.1ms) CREATE INDEX "index_bloom_remit_txns_on_owner_id_and_owner_type" ON "bloom_remit_txns" ("owner_id", "owner_type")
30780
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805040950"]]
30781
+  (1.8ms) COMMIT
30782
+ Migrating to CreatePayments (20160805042105)
30783
+  (0.2ms) BEGIN
30784
+  (6.3ms) CREATE TABLE "payments" ("id" serial primary key)
30785
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805042105"]]
30786
+  (1.3ms) COMMIT
30787
+ Migrating to ChangeTxnsSenderIdToString (20160805095308)
30788
+  (0.2ms) BEGIN
30789
+  (9.1ms) ALTER TABLE "bloom_remit_txns" ALTER COLUMN "sender_id" TYPE character varying
30790
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160805095308"]]
30791
+  (1.7ms) COMMIT
30792
+ Migrating to AddTypeToUsers (20160806011259)
30793
+  (0.4ms) BEGIN
30794
+  (0.9ms) ALTER TABLE "users" ADD "type" character varying
30795
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806011259"]]
30796
+  (1.7ms) COMMIT
30797
+ Migrating to AddTypeToPayments (20160806012210)
30798
+  (0.3ms) BEGIN
30799
+  (4.5ms) ALTER TABLE "payments" ADD "type" character varying
30800
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806012210"]]
30801
+  (1.1ms) COMMIT
30802
+ Migrating to CreateBloomRemitResponses (20160806054012)
30803
+  (0.3ms) BEGIN
30804
+  (9.2ms) CREATE TABLE "bloom_remit_responses" ("id" serial primary key, "txn_id" integer NOT NULL, "body" text NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
30805
+  (3.3ms) CREATE INDEX "index_bloom_remit_responses_on_txn_id" ON "bloom_remit_responses" ("txn_id")
30806
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160806054012"]]
30807
+  (1.2ms) COMMIT
30808
+ Migrating to AddExternalIdToBloomRemitTxns (20160808081300)
30809
+  (0.3ms) BEGIN
30810
+  (0.7ms) ALTER TABLE "bloom_remit_txns" ADD "external_id" character varying NOT NULL
30811
+  (2.2ms) CREATE INDEX "index_bloom_remit_txns_on_external_id" ON "bloom_remit_txns" ("external_id")
30812
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160808081300"]]
30813
+  (0.8ms) COMMIT
30814
+ Migrating to AddStatusDescriptionToBloomRemitTxns (20160809043433)
30815
+  (0.3ms) BEGIN
30816
+  (2.2ms) ALTER TABLE "bloom_remit_txns" ADD "status_description" text
30817
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160809043433"]]
30818
+  (1.0ms) COMMIT
30819
+ Migrating to AddVendorExternalIdToBloomRemitTxns (20160817003323)
30820
+  (0.3ms) BEGIN
30821
+  (0.5ms) ALTER TABLE "bloom_remit_txns" ADD "vendor_external_id" character varying
30822
+  (2.9ms) CREATE INDEX "index_bloom_remit_txns_on_vendor_external_id" ON "bloom_remit_txns" ("vendor_external_id")
30823
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160817003323"]]
30824
+  (0.7ms) COMMIT
30825
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
30826
+  (2.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30827
+ FROM pg_constraint c
30828
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30829
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30830
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30831
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30832
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30833
+ WHERE c.contype = 'f'
30834
+ AND t1.relname = 'billers'
30835
+ AND t3.nspname = ANY (current_schemas(false))
30836
+ ORDER BY c.conname
30837
+ 
30838
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30839
+ FROM pg_constraint c
30840
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30841
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30842
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30843
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30844
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30845
+ WHERE c.contype = 'f'
30846
+ AND t1.relname = 'bloom_remit_responses'
30847
+ AND t3.nspname = ANY (current_schemas(false))
30848
+ ORDER BY c.conname
30849
+
30850
+  (2.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30851
+ FROM pg_constraint c
30852
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30853
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30854
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30855
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30856
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30857
+ WHERE c.contype = 'f'
30858
+ AND t1.relname = 'bloom_remit_txns'
30859
+ AND t3.nspname = ANY (current_schemas(false))
30860
+ ORDER BY c.conname
30861
+ 
30862
+  (2.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30863
+ FROM pg_constraint c
30864
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30865
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30866
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30867
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30868
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30869
+ WHERE c.contype = 'f'
30870
+ AND t1.relname = 'payments'
30871
+ AND t3.nspname = ANY (current_schemas(false))
30872
+ ORDER BY c.conname
30873
+
30874
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
30875
+ FROM pg_constraint c
30876
+ JOIN pg_class t1 ON c.conrelid = t1.oid
30877
+ JOIN pg_class t2 ON c.confrelid = t2.oid
30878
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
30879
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
30880
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
30881
+ WHERE c.contype = 'f'
30882
+ AND t1.relname = 'users'
30883
+ AND t3.nspname = ANY (current_schemas(false))
30884
+ ORDER BY c.conname
30885
+ 
30886
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
30887
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
30888
+  (1.3ms)  SELECT schemaname || '.' || tablename
30889
+ FROM pg_tables
30890
+ WHERE
30891
+ tablename !~ '_prt_' AND
30892
+ tablename <> 'schema_migrations' AND
30893
+ schemaname = ANY (current_schemas(false))
30894
+ 
30895
+  (1.2ms) select table_name from information_schema.views where table_schema = 'app_test'
30896
+  (26.4ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
30897
+  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
30898
+  (0.4ms) BEGIN
30899
+  (0.4ms) COMMIT
30900
+  (0.4ms) BEGIN
30901
+  (0.3ms) ROLLBACK
30902
+  (0.2ms) BEGIN
30903
+  (0.3ms) COMMIT
30904
+  (0.2ms) BEGIN
30905
+  (0.4ms) ROLLBACK
30906
+  (0.2ms) BEGIN
30907
+  (0.2ms) COMMIT
30908
+  (0.3ms) BEGIN
30909
+  (0.5ms) ROLLBACK
30910
+  (0.5ms) BEGIN
30911
+ SQL (0.7ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
30912
+  (1.8ms) COMMIT
30913
+  (0.7ms) BEGIN
30914
+ SQL (0.5ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
30915
+  (0.9ms) COMMIT
30916
+  (0.3ms) BEGIN
30917
+ SQL (0.5ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
30918
+  (0.9ms) COMMIT
30919
+  (0.3ms) BEGIN
30920
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "b7b69113-ca68-43e5-b78c-ad22e96cb8b2"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "ac0eb9debf9e009c2864dc7c"]]
30921
+  (0.9ms) COMMIT
30922
+ User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
30923
+ Payment Load (0.4ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
30924
+  (0.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
30925
+  (35.1ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
30926
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
30927
+  (0.4ms) BEGIN
30928
+ SQL (0.8ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
30929
+  (0.9ms) COMMIT
30930
+  (0.2ms) BEGIN
30931
+ SQL (0.6ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "29451f7c-e40b-43c0-9b87-19348a2b7224"], ["external_id", "9e70c49e5fd3514fb2b33e85"], ["sender_id", "1"], ["sender_type", "User"]]
30932
+  (0.8ms) COMMIT
30933
+ BloomRemit::Txn Load (0.5ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "29451f7c-e40b-43c0-9b87-19348a2b7224"]]
30934
+  (0.2ms) BEGIN
30935
+ SQL (1.3ms) UPDATE "bloom_remit_txns" SET "status" = $1, "status_description" = $2, "vendor_external_id" = $3 WHERE "bloom_remit_txns"."id" = $4 [["status", 1], ["status_description", "My status description"], ["vendor_external_id", "somerefno"], ["id", 1]]
30936
+  (0.8ms) COMMIT
30937
+  (0.2ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
30938
+  (36.4ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
30939
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
30940
+  (0.2ms) BEGIN
30941
+  (0.2ms) COMMIT
30942
+  (0.2ms) BEGIN
30943
+  (0.3ms) ROLLBACK
30944
+  (0.2ms) BEGIN
30945
+  (0.2ms) COMMIT
30946
+  (0.2ms) BEGIN
30947
+  (0.2ms) ROLLBACK
30948
+  (0.3ms) BEGIN
30949
+  (0.2ms) COMMIT
30950
+  (0.2ms) BEGIN
30951
+  (0.4ms) ROLLBACK
30952
+  (0.1ms) BEGIN
30953
+  (0.2ms) COMMIT
30954
+  (0.2ms) BEGIN
30955
+  (0.2ms) ROLLBACK
30956
+  (0.2ms) BEGIN
30957
+  (0.2ms) COMMIT
30958
+  (0.1ms) BEGIN
30959
+  (0.2ms) ROLLBACK
30960
+  (0.3ms) BEGIN
30961
+  (0.2ms) COMMIT
30962
+  (0.2ms) BEGIN
30963
+  (0.2ms) ROLLBACK
30964
+  (0.2ms) BEGIN
30965
+  (0.2ms) COMMIT
30966
+  (0.2ms) BEGIN
30967
+  (0.2ms) ROLLBACK
30968
+  (0.2ms) BEGIN
30969
+  (0.2ms) COMMIT
30970
+  (0.1ms) BEGIN
30971
+  (0.2ms) SAVEPOINT active_record_1
30972
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
30973
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30974
+  (0.2ms) SAVEPOINT active_record_1
30975
+ SQL (0.6ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "aafcc137-973b-4b1b-af6f-235cfabe8b48"], ["external_id", "fab80018c674dc857bc86bd9"], ["sender_id", "1"], ["sender_type", "User"]]
30976
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30977
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-09-01 08:28:10 +0000
30978
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
30979
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
30980
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", nil]]
30981
+ Rendered text template (0.0ms)
30982
+ Completed 404 Not Found in 51ms (Views: 48.6ms | ActiveRecord: 0.4ms)
30983
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-09-01 08:28:11 +0000
30984
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
30985
+ Parameters: {"secret"=>"aafcc137-973b-4b1b-af6f-235cfabe8b48", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"aafcc137-973b-4b1b-af6f-235cfabe8b48"}}
30986
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "aafcc137-973b-4b1b-af6f-235cfabe8b48"]]
30987
+  (0.2ms) SAVEPOINT active_record_1
30988
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
30989
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30990
+ Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 1.1ms)
30991
+ BloomRemit::Txn Load (0.3ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
30992
+  (0.2ms) ROLLBACK
30993
+  (0.1ms) BEGIN
30994
+  (0.2ms) COMMIT
30995
+  (0.1ms) BEGIN
30996
+  (0.2ms) SAVEPOINT active_record_1
30997
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
30998
+  (0.2ms) RELEASE SAVEPOINT active_record_1
30999
+  (0.2ms) SAVEPOINT active_record_1
31000
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "50716e10-ab3b-4a62-b681-f62063de9107"], ["external_id", "7174e538a66c3ff17d99122f"], ["sender_id", "2"], ["sender_type", "User"]]
31001
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31002
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-09-01 08:28:11 +0000
31003
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
31004
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
31005
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", nil]]
31006
+ Rendered text template (0.0ms)
31007
+ Completed 404 Not Found in 3ms (Views: 0.9ms | ActiveRecord: 0.4ms)
31008
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-09-01 08:28:11 +0000
31009
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
31010
+ Parameters: {"secret"=>"50716e10-ab3b-4a62-b681-f62063de9107", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"50716e10-ab3b-4a62-b681-f62063de9107"}}
31011
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", "50716e10-ab3b-4a62-b681-f62063de9107"]]
31012
+  (0.2ms) SAVEPOINT active_record_1
31013
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
31014
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31015
+ Completed 204 No Content in 58ms (ActiveRecord: 1.2ms)
31016
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
31017
+  (0.2ms) ROLLBACK
31018
+  (0.1ms) BEGIN
31019
+  (0.2ms) COMMIT
31020
+  (0.2ms) BEGIN
31021
+  (0.2ms) SAVEPOINT active_record_1
31022
+ SQL (0.4ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
31023
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31024
+  (0.2ms) SAVEPOINT active_record_1
31025
+ SQL (0.5ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
31026
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31027
+  (0.2ms) SAVEPOINT active_record_1
31028
+ SQL (0.5ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
31029
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31030
+  (0.3ms) SAVEPOINT active_record_1
31031
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "383d5a17-8eab-4efe-8f83-2e329648c2b8"], ["sender_type", "User"], ["sender_id", "3"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "0616630a029ab914ed83d6e6"]]
31032
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31033
+  (0.2ms) ROLLBACK
31034
+  (0.1ms) BEGIN
31035
+  (0.2ms) COMMIT
31036
+  (0.2ms) BEGIN
31037
+  (0.2ms) ROLLBACK
31038
+  (0.2ms) BEGIN
31039
+  (0.3ms) COMMIT
31040
+  (0.2ms) BEGIN
31041
+  (0.2ms) SAVEPOINT active_record_1
31042
+ SQL (0.4ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31043
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31044
+  (0.2ms) SAVEPOINT active_record_1
31045
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31046
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31047
+  (0.2ms) SAVEPOINT active_record_1
31048
+ SQL (0.3ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "6fa65d97-1cc8-47d6-acd5-807fb0e4a29a"], ["external_id", "de91f07512aba2b1fc7e568b"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
31049
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31050
+  (0.4ms) ROLLBACK
31051
+  (0.1ms) BEGIN
31052
+  (0.2ms) COMMIT
31053
+  (0.2ms) BEGIN
31054
+  (0.2ms) SAVEPOINT active_record_1
31055
+ SQL (0.3ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31056
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31057
+  (0.2ms) SAVEPOINT active_record_1
31058
+ SQL (0.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31059
+  (0.6ms) RELEASE SAVEPOINT active_record_1
31060
+  (0.4ms) SAVEPOINT active_record_1
31061
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "3380bc90-f525-474c-a1bf-fac7cc22933e"], ["external_id", "ae82cbca98a7b676c9cfcef8"], ["owner_id", "3"], ["owner_type", "Payment"], ["sender_id", "5"], ["sender_type", "User"]]
31062
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31063
+  (0.2ms) ROLLBACK
31064
+  (0.1ms) BEGIN
31065
+  (0.2ms) COMMIT
31066
+  (0.1ms) BEGIN
31067
+  (0.2ms) ROLLBACK
31068
+  (0.1ms) BEGIN
31069
+  (0.2ms) COMMIT
31070
+  (0.2ms) BEGIN
31071
+  (0.3ms) ROLLBACK
31072
+  (0.1ms) BEGIN
31073
+  (0.2ms) COMMIT
31074
+  (0.2ms) BEGIN
31075
+  (0.2ms) ROLLBACK
31076
+  (0.1ms) BEGIN
31077
+  (0.2ms) COMMIT
31078
+  (0.1ms) BEGIN
31079
+  (0.2ms) ROLLBACK
31080
+  (0.1ms) BEGIN
31081
+  (0.2ms) COMMIT
31082
+  (0.2ms) BEGIN
31083
+  (0.2ms) ROLLBACK
31084
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
31085
+  (0.6ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31086
+  (1.3ms)  SELECT schemaname || '.' || tablename
31087
+ FROM pg_tables
31088
+ WHERE
31089
+ tablename !~ '_prt_' AND
31090
+ tablename <> 'schema_migrations' AND
31091
+ schemaname = ANY (current_schemas(false))
31092
+ 
31093
+  (1.2ms) select table_name from information_schema.views where table_schema = 'app_test'
31094
+  (32.7ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31095
+  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31096
+  (0.4ms) BEGIN
31097
+  (0.3ms) COMMIT
31098
+  (0.3ms) BEGIN
31099
+  (0.3ms) SAVEPOINT active_record_1
31100
+ SQL (0.7ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31101
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31102
+  (0.4ms) SAVEPOINT active_record_1
31103
+ SQL (0.7ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31104
+  (0.6ms) RELEASE SAVEPOINT active_record_1
31105
+  (0.3ms) SAVEPOINT active_record_1
31106
+ SQL (0.8ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "f2a38286-2fd8-4335-9e36-6e33046f9c02"], ["external_id", "b2a706b639cabd35a017c6a1"], ["owner_id", "1"], ["owner_type", "Payment"], ["sender_id", "1"], ["sender_type", "User"]]
31107
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31108
+  (0.5ms) ROLLBACK
31109
+  (0.3ms) BEGIN
31110
+  (0.3ms) COMMIT
31111
+  (0.3ms) BEGIN
31112
+  (0.3ms) SAVEPOINT active_record_1
31113
+ SQL (0.5ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31114
+  (0.5ms) RELEASE SAVEPOINT active_record_1
31115
+  (0.3ms) SAVEPOINT active_record_1
31116
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31117
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31118
+  (0.3ms) SAVEPOINT active_record_1
31119
+ SQL (0.6ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "0490b469-a25a-4108-9204-8aa8dd5d755c"], ["external_id", "078ed02b9909dc1d1c9965b2"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "2"], ["sender_type", "User"]]
31120
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31121
+  (0.3ms) ROLLBACK
31122
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
31123
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31124
+  (1.3ms)  SELECT schemaname || '.' || tablename
31125
+ FROM pg_tables
31126
+ WHERE
31127
+ tablename !~ '_prt_' AND
31128
+ tablename <> 'schema_migrations' AND
31129
+ schemaname = ANY (current_schemas(false))
31130
+ 
31131
+  (1.2ms) select table_name from information_schema.views where table_schema = 'app_test'
31132
+  (26.6ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31133
+  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31134
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
31135
+  (0.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31136
+  (1.3ms)  SELECT schemaname || '.' || tablename
31137
+ FROM pg_tables
31138
+ WHERE
31139
+ tablename !~ '_prt_' AND
31140
+ tablename <> 'schema_migrations' AND
31141
+ schemaname = ANY (current_schemas(false))
31142
+ 
31143
+  (1.1ms) select table_name from information_schema.views where table_schema = 'app_test'
31144
+  (33.8ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31145
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31146
+  (0.2ms) BEGIN
31147
+  (0.4ms) COMMIT
31148
+  (0.2ms) BEGIN
31149
+  (0.2ms) SAVEPOINT active_record_1
31150
+ SQL (0.6ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31151
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31152
+  (0.2ms) SAVEPOINT active_record_1
31153
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31154
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31155
+  (0.2ms) SAVEPOINT active_record_1
31156
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "18d7fd37-afde-4ae7-b7c2-a8dd670f4be2"], ["external_id", "0570128fc84b173c60c484ee"], ["owner_id", "1"], ["owner_type", "Payment"], ["sender_id", "1"], ["sender_type", "User"]]
31157
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31158
+  (0.2ms) ROLLBACK
31159
+  (0.2ms) BEGIN
31160
+  (0.2ms) COMMIT
31161
+  (0.2ms) BEGIN
31162
+  (0.2ms) SAVEPOINT active_record_1
31163
+ SQL (0.5ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31164
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31165
+  (0.2ms) SAVEPOINT active_record_1
31166
+ SQL (0.3ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31167
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31168
+  (0.2ms) SAVEPOINT active_record_1
31169
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "ab7faddd-844e-4f60-99ed-1051c336f19c"], ["external_id", "5959df784423b9b99808abcb"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "2"], ["sender_type", "User"]]
31170
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31171
+  (0.2ms) ROLLBACK
31172
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
31173
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31174
+  (1.2ms)  SELECT schemaname || '.' || tablename
31175
+ FROM pg_tables
31176
+ WHERE
31177
+ tablename !~ '_prt_' AND
31178
+ tablename <> 'schema_migrations' AND
31179
+ schemaname = ANY (current_schemas(false))
31180
+ 
31181
+  (1.1ms) select table_name from information_schema.views where table_schema = 'app_test'
31182
+  (38.8ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31183
+  (0.5ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31184
+  (0.4ms) BEGIN
31185
+  (0.3ms) COMMIT
31186
+  (0.4ms) BEGIN
31187
+  (0.3ms) SAVEPOINT active_record_1
31188
+ SQL (0.7ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31189
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31190
+  (0.3ms) SAVEPOINT active_record_1
31191
+ SQL (0.7ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31192
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31193
+  (0.3ms) SAVEPOINT active_record_1
31194
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "b8a1b4b5-b10d-4fd8-952e-914e4a714539"], ["external_id", "b37131f8f23e9449d2c40e97"], ["owner_id", "1"], ["owner_type", "Payment"], ["sender_id", "1"], ["sender_type", "User"]]
31195
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31196
+  (0.3ms) ROLLBACK
31197
+  (0.3ms) BEGIN
31198
+  (0.6ms) COMMIT
31199
+  (0.6ms) BEGIN
31200
+  (0.3ms) SAVEPOINT active_record_1
31201
+ SQL (0.4ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31202
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31203
+  (0.3ms) SAVEPOINT active_record_1
31204
+ SQL (0.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31205
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31206
+  (0.2ms) SAVEPOINT active_record_1
31207
+ SQL (0.5ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "7585a816-1191-44e0-8e29-5583782f91d8"], ["external_id", "19567584dbda43cf1574d76c"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "2"], ["sender_type", "User"]]
31208
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31209
+  (0.3ms) ROLLBACK
31210
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
31211
+  (0.8ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31212
+  (1.2ms)  SELECT schemaname || '.' || tablename
31213
+ FROM pg_tables
31214
+ WHERE
31215
+ tablename !~ '_prt_' AND
31216
+ tablename <> 'schema_migrations' AND
31217
+ schemaname = ANY (current_schemas(false))
31218
+ 
31219
+  (1.0ms) select table_name from information_schema.views where table_schema = 'app_test'
31220
+  (36.7ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31221
+  (0.7ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31222
+  (0.3ms) BEGIN
31223
+  (0.3ms) COMMIT
31224
+  (0.3ms) BEGIN
31225
+  (0.2ms) SAVEPOINT active_record_1
31226
+ SQL (0.5ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31227
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31228
+  (0.2ms) SAVEPOINT active_record_1
31229
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31230
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31231
+  (0.3ms) SAVEPOINT active_record_1
31232
+ SQL (1.5ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "235e5623-9bcd-4c19-9451-7046432e612f"], ["external_id", "1af730ef4d77b4c3ef299e10"], ["owner_id", "1"], ["owner_type", "Payment"], ["sender_id", "1"], ["sender_type", "User"]]
31233
+  (0.5ms) RELEASE SAVEPOINT active_record_1
31234
+  (0.6ms) ROLLBACK
31235
+  (0.1ms) BEGIN
31236
+  (0.2ms) COMMIT
31237
+  (0.1ms) BEGIN
31238
+  (0.2ms) SAVEPOINT active_record_1
31239
+ SQL (0.3ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31240
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31241
+  (0.2ms) SAVEPOINT active_record_1
31242
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31243
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31244
+  (0.2ms) SAVEPOINT active_record_1
31245
+ SQL (0.3ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "1e874f7f-78a1-41f1-b6a0-6d93ac8794ab"], ["external_id", "e9c4de674a71c3a4c3b033e0"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "2"], ["sender_type", "User"]]
31246
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31247
+  (0.2ms) ROLLBACK
31248
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
31249
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31250
+  (1.3ms)  SELECT schemaname || '.' || tablename
31251
+ FROM pg_tables
31252
+ WHERE
31253
+ tablename !~ '_prt_' AND
31254
+ tablename <> 'schema_migrations' AND
31255
+ schemaname = ANY (current_schemas(false))
31256
+ 
31257
+  (1.1ms) select table_name from information_schema.views where table_schema = 'app_test'
31258
+  (28.2ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31259
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31260
+  (0.3ms) BEGIN
31261
+  (0.3ms) COMMIT
31262
+  (0.3ms) BEGIN
31263
+  (0.3ms) SAVEPOINT active_record_1
31264
+ SQL (0.6ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31265
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31266
+  (0.3ms) SAVEPOINT active_record_1
31267
+ SQL (0.6ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31268
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31269
+  (0.2ms) SAVEPOINT active_record_1
31270
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "732423bb-eddc-4e17-9dbe-18d9d1cb811d"], ["external_id", "51841a7af95130ba1a73513a"], ["owner_id", "1"], ["owner_type", "Payment"], ["sender_id", "1"], ["sender_type", "User"]]
31271
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31272
+  (0.4ms) SAVEPOINT active_record_1
31273
+ SQL (0.6ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"i\":\"am body\"}"], ["txn_id", 1], ["created_at", "2016-09-01 08:36:57.667933"], ["updated_at", "2016-09-01 08:36:57.667933"]]
31274
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31275
+  (0.4ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 1]]
31276
+ BloomRemit::Response Load (0.6ms) SELECT "bloom_remit_responses".* FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 ORDER BY "bloom_remit_responses"."id" ASC LIMIT 1 [["txn_id", 1]]
31277
+  (0.5ms) ROLLBACK
31278
+  (0.3ms) BEGIN
31279
+  (0.4ms) COMMIT
31280
+  (0.3ms) BEGIN
31281
+  (0.4ms) SAVEPOINT active_record_1
31282
+ SQL (0.5ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31283
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31284
+  (0.3ms) SAVEPOINT active_record_1
31285
+ SQL (0.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31286
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31287
+  (0.3ms) SAVEPOINT active_record_1
31288
+ SQL (0.4ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "b6b38d6b-e6c2-43ce-b13f-8bfd44ad76a8"], ["external_id", "59eb8773a9f756be6c53a8e6"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "2"], ["sender_type", "User"]]
31289
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31290
+  (0.3ms) SAVEPOINT active_record_1
31291
+ SQL (0.5ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 7], ["id", 2]]
31292
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31293
+  (0.3ms) SAVEPOINT active_record_1
31294
+ SQL (0.4ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"status\":\"500\",\"error\":\"Internal Server Error\"}"], ["txn_id", 2], ["created_at", "2016-09-01 08:36:57.755027"], ["updated_at", "2016-09-01 08:36:57.755027"]]
31295
+  (0.3ms) RELEASE SAVEPOINT active_record_1
31296
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
31297
+  (0.3ms) ROLLBACK
31298
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
31299
+  (0.5ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31300
+  (1.3ms)  SELECT schemaname || '.' || tablename
31301
+ FROM pg_tables
31302
+ WHERE
31303
+ tablename !~ '_prt_' AND
31304
+ tablename <> 'schema_migrations' AND
31305
+ schemaname = ANY (current_schemas(false))
31306
+ 
31307
+  (1.2ms) select table_name from information_schema.views where table_schema = 'app_test'
31308
+  (33.2ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31309
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31310
+  (0.3ms) BEGIN
31311
+  (0.4ms) COMMIT
31312
+  (0.3ms) BEGIN
31313
+  (0.8ms) ROLLBACK
31314
+  (0.3ms) BEGIN
31315
+  (0.4ms) COMMIT
31316
+  (0.3ms) BEGIN
31317
+  (0.3ms) ROLLBACK
31318
+  (0.3ms) BEGIN
31319
+  (0.3ms) COMMIT
31320
+  (0.2ms) BEGIN
31321
+  (0.4ms) ROLLBACK
31322
+  (0.4ms) BEGIN
31323
+ SQL (1.3ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
31324
+  (1.7ms) COMMIT
31325
+  (0.2ms) BEGIN
31326
+ SQL (0.3ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
31327
+  (0.8ms) COMMIT
31328
+  (0.2ms) BEGIN
31329
+ SQL (0.4ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
31330
+  (0.9ms) COMMIT
31331
+  (0.2ms) BEGIN
31332
+ SQL (0.5ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "2935470c-8fa5-4d20-aa94-4c04b3ba75aa"], ["sender_type", "User"], ["sender_id", "1"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "0093d4a144f850794a78439c"]]
31333
+  (0.8ms) COMMIT
31334
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1]]
31335
+ Payment Load (0.4ms) SELECT "payments".* FROM "payments" WHERE "payments"."id" = $1 LIMIT 1 [["id", 1]]
31336
+  (0.4ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31337
+  (33.2ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31338
+  (0.3ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31339
+  (0.2ms) BEGIN
31340
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31341
+  (0.6ms) COMMIT
31342
+  (0.2ms) BEGIN
31343
+ SQL (0.5ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "3445a3fd-5c88-471d-ad94-5457b5e1cdab"], ["external_id", "045f4d23680a331a785ca3d7"], ["sender_id", "1"], ["sender_type", "User"]]
31344
+  (0.7ms) COMMIT
31345
+ BloomRemit::Txn Load (0.3ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "3445a3fd-5c88-471d-ad94-5457b5e1cdab"]]
31346
+  (0.2ms) BEGIN
31347
+ SQL (0.3ms) UPDATE "bloom_remit_txns" SET "status" = $1, "status_description" = $2, "vendor_external_id" = $3 WHERE "bloom_remit_txns"."id" = $4 [["status", 1], ["status_description", "My status description"], ["vendor_external_id", "somerefno"], ["id", 1]]
31348
+  (0.8ms) COMMIT
31349
+  (0.3ms) ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "billers" DISABLE TRIGGER ALL;ALTER TABLE "users" DISABLE TRIGGER ALL;ALTER TABLE "payments" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" DISABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" DISABLE TRIGGER ALL
31350
+  (34.1ms) TRUNCATE TABLE "public"."billers", "public"."users", "public"."payments", "public"."bloom_remit_responses", "public"."bloom_remit_txns" RESTART IDENTITY CASCADE;
31351
+  (0.4ms) ALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "billers" ENABLE TRIGGER ALL;ALTER TABLE "users" ENABLE TRIGGER ALL;ALTER TABLE "payments" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_responses" ENABLE TRIGGER ALL;ALTER TABLE "bloom_remit_txns" ENABLE TRIGGER ALL
31352
+  (0.1ms) BEGIN
31353
+  (0.2ms) COMMIT
31354
+  (0.2ms) BEGIN
31355
+  (0.2ms) ROLLBACK
31356
+  (0.2ms) BEGIN
31357
+  (0.2ms) COMMIT
31358
+  (0.2ms) BEGIN
31359
+  (0.2ms) ROLLBACK
31360
+  (0.1ms) BEGIN
31361
+  (0.2ms) COMMIT
31362
+  (0.1ms) BEGIN
31363
+  (0.4ms) ROLLBACK
31364
+  (0.1ms) BEGIN
31365
+  (0.2ms) COMMIT
31366
+  (0.1ms) BEGIN
31367
+  (0.2ms) ROLLBACK
31368
+  (0.1ms) BEGIN
31369
+  (0.2ms) COMMIT
31370
+  (0.3ms) BEGIN
31371
+  (0.2ms) ROLLBACK
31372
+  (0.1ms) BEGIN
31373
+  (0.2ms) COMMIT
31374
+  (0.1ms) BEGIN
31375
+  (0.2ms) ROLLBACK
31376
+  (0.2ms) BEGIN
31377
+  (0.2ms) COMMIT
31378
+  (0.1ms) BEGIN
31379
+  (0.3ms) ROLLBACK
31380
+  (0.1ms) BEGIN
31381
+  (0.2ms) COMMIT
31382
+  (0.2ms) BEGIN
31383
+  (0.5ms) SAVEPOINT active_record_1
31384
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31385
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31386
+  (0.2ms) SAVEPOINT active_record_1
31387
+ SQL (0.6ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "faef9bb7-6374-4476-9424-667592765c30"], ["external_id", "287cf61afd727c5c40cdf7d7"], ["sender_id", "1"], ["sender_type", "User"]]
31388
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31389
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-09-01 08:40:21 +0000
31390
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
31391
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"1", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
31392
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", nil]]
31393
+ Rendered text template (0.0ms)
31394
+ Completed 404 Not Found in 54ms (Views: 52.0ms | ActiveRecord: 0.4ms)
31395
+ Started POST "/bloom_remit/api/v1/txns/1" for 127.0.0.1 at 2016-09-01 08:40:21 +0000
31396
+ Processing by BloomRemit::Api::V1::TxnsController#post_update as JSON
31397
+ Parameters: {"secret"=>"faef9bb7-6374-4476-9424-667592765c30", "status"=>"paid", "id"=>"1", "txn"=>{"status"=>"paid", "secret"=>"faef9bb7-6374-4476-9424-667592765c30"}}
31398
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 1], ["secret", "faef9bb7-6374-4476-9424-667592765c30"]]
31399
+  (0.2ms) SAVEPOINT active_record_1
31400
+ SQL (0.2ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 1]]
31401
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31402
+ Completed 200 OK in 7ms (Views: 0.4ms | ActiveRecord: 1.0ms)
31403
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 1]]
31404
+  (0.2ms) ROLLBACK
31405
+  (0.1ms) BEGIN
31406
+  (0.2ms) COMMIT
31407
+  (0.2ms) BEGIN
31408
+  (0.2ms) SAVEPOINT active_record_1
31409
+ SQL (0.4ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31410
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31411
+  (0.2ms) SAVEPOINT active_record_1
31412
+ SQL (0.3ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "2b86b0fc-0bc5-4b2b-a32c-4e01a3876ea4"], ["external_id", "cedeae050a38c571c6c209bd"], ["sender_id", "2"], ["sender_type", "User"]]
31413
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31414
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-09-01 08:40:21 +0000
31415
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
31416
+ Parameters: {"secret"=>"fake", "status"=>"doesn't matter", "id"=>"2", "txn"=>{"status"=>"doesn't matter", "secret"=>"fake"}}
31417
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", nil]]
31418
+ Rendered text template (0.0ms)
31419
+ Completed 404 Not Found in 3ms (Views: 1.0ms | ActiveRecord: 0.4ms)
31420
+ Started PATCH "/bloom_remit/api/v1/txns/2" for 127.0.0.1 at 2016-09-01 08:40:21 +0000
31421
+ Processing by BloomRemit::Api::V1::TxnsController#update as JSON
31422
+ Parameters: {"secret"=>"2b86b0fc-0bc5-4b2b-a32c-4e01a3876ea4", "status"=>"paid", "id"=>"2", "txn"=>{"status"=>"paid", "secret"=>"2b86b0fc-0bc5-4b2b-a32c-4e01a3876ea4"}}
31423
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 AND "bloom_remit_txns"."secret" = $2 LIMIT 1 [["id", 2], ["secret", "2b86b0fc-0bc5-4b2b-a32c-4e01a3876ea4"]]
31424
+  (0.2ms) SAVEPOINT active_record_1
31425
+ SQL (0.5ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 1], ["id", 2]]
31426
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31427
+ Completed 204 No Content in 47ms (ActiveRecord: 1.2ms)
31428
+ BloomRemit::Txn Load (0.4ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 2]]
31429
+  (0.2ms) ROLLBACK
31430
+  (0.1ms) BEGIN
31431
+  (0.2ms) COMMIT
31432
+  (0.2ms) BEGIN
31433
+  (0.2ms) SAVEPOINT active_record_1
31434
+ SQL (0.3ms) INSERT INTO "users" ("type") VALUES ($1) RETURNING "id" [["type", "SubUser"]]
31435
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31436
+  (0.2ms) SAVEPOINT active_record_1
31437
+ SQL (0.5ms) INSERT INTO "billers" ("slug") VALUES ($1) RETURNING "id" [["slug", "PLDT"]]
31438
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31439
+  (0.2ms) SAVEPOINT active_record_1
31440
+ SQL (0.5ms) INSERT INTO "payments" ("type") VALUES ($1) RETURNING "id" [["type", "SubPayment"]]
31441
+  (0.2ms) RELEASE SAVEPOINT active_record_1
31442
+  (0.2ms) SAVEPOINT active_record_1
31443
+ SQL (0.8ms) INSERT INTO "bloom_remit_txns" ("secret", "sender_type", "sender_id", "amount", "account_name", "account_id", "target_slug", "owner_id", "owner_type", "external_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id" [["secret", "f73d1176-2716-4230-b98a-af564a5566f6"], ["sender_type", "User"], ["sender_id", "3"], ["amount", "800.0"], ["account_name", "028109090"], ["account_id", "Hooli X"], ["target_slug", "PLDT"], ["owner_id", "1"], ["owner_type", "Payment"], ["external_id", "dc278d6fbda5aa0b1708f5db"]]
31444
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31445
+  (1.9ms) ROLLBACK
31446
+  (2.7ms) BEGIN
31447
+  (0.6ms) COMMIT
31448
+  (0.6ms) BEGIN
31449
+  (0.7ms) ROLLBACK
31450
+  (0.4ms) BEGIN
31451
+  (0.4ms) COMMIT
31452
+  (0.4ms) BEGIN
31453
+  (0.8ms) SAVEPOINT active_record_1
31454
+ SQL (4.2ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31455
+  (0.8ms) RELEASE SAVEPOINT active_record_1
31456
+  (0.5ms) SAVEPOINT active_record_1
31457
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31458
+  (1.1ms) RELEASE SAVEPOINT active_record_1
31459
+  (0.7ms) SAVEPOINT active_record_1
31460
+ SQL (1.0ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "a113628f-420a-4380-b4ae-1db1223907bd"], ["external_id", "8d28b8e1bea5134259a1351f"], ["owner_id", "2"], ["owner_type", "Payment"], ["sender_id", "4"], ["sender_type", "User"]]
31461
+  (0.5ms) RELEASE SAVEPOINT active_record_1
31462
+  (0.3ms) SAVEPOINT active_record_1
31463
+ SQL (0.5ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"i\":\"am body\"}"], ["txn_id", 4], ["created_at", "2016-09-01 08:40:22.234828"], ["updated_at", "2016-09-01 08:40:22.234828"]]
31464
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31465
+  (0.4ms) SELECT COUNT(*) FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 [["txn_id", 4]]
31466
+ BloomRemit::Response Load (0.4ms) SELECT "bloom_remit_responses".* FROM "bloom_remit_responses" WHERE "bloom_remit_responses"."txn_id" = $1 ORDER BY "bloom_remit_responses"."id" ASC LIMIT 1 [["txn_id", 4]]
31467
+  (0.3ms) ROLLBACK
31468
+  (0.3ms) BEGIN
31469
+  (0.4ms) COMMIT
31470
+  (0.5ms) BEGIN
31471
+  (0.3ms) SAVEPOINT active_record_1
31472
+ SQL (0.6ms) INSERT INTO "payments" DEFAULT VALUES RETURNING "id"
31473
+  (1.4ms) RELEASE SAVEPOINT active_record_1
31474
+  (0.3ms) SAVEPOINT active_record_1
31475
+ SQL (0.5ms) INSERT INTO "users" DEFAULT VALUES RETURNING "id"
31476
+  (1.2ms) RELEASE SAVEPOINT active_record_1
31477
+  (0.4ms) SAVEPOINT active_record_1
31478
+ SQL (0.7ms) INSERT INTO "bloom_remit_txns" ("target_slug", "amount", "secret", "external_id", "owner_id", "owner_type", "sender_id", "sender_type") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["target_slug", "TARGET_SLUG"], ["amount", "2500.0"], ["secret", "63741166-4b03-4f41-a0e0-cd7f76d02df5"], ["external_id", "ba558d75a7a3664ec081bd46"], ["owner_id", "3"], ["owner_type", "Payment"], ["sender_id", "5"], ["sender_type", "User"]]
31479
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31480
+  (0.5ms) SAVEPOINT active_record_1
31481
+ SQL (1.4ms) UPDATE "bloom_remit_txns" SET "status" = $1 WHERE "bloom_remit_txns"."id" = $2 [["status", 7], ["id", 5]]
31482
+  (1.9ms) RELEASE SAVEPOINT active_record_1
31483
+  (0.4ms) SAVEPOINT active_record_1
31484
+ SQL (0.6ms) INSERT INTO "bloom_remit_responses" ("body", "txn_id", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "id" [["body", "{\"status\":\"500\",\"error\":\"Internal Server Error\"}"], ["txn_id", 5], ["created_at", "2016-09-01 08:40:22.299392"], ["updated_at", "2016-09-01 08:40:22.299392"]]
31485
+  (0.4ms) RELEASE SAVEPOINT active_record_1
31486
+ BloomRemit::Txn Load (1.1ms) SELECT "bloom_remit_txns".* FROM "bloom_remit_txns" WHERE "bloom_remit_txns"."id" = $1 LIMIT 1 [["id", 5]]
31487
+  (1.7ms) ROLLBACK
31488
+  (0.4ms) BEGIN
31489
+  (0.4ms) COMMIT
31490
+  (0.3ms) BEGIN
31491
+  (0.4ms) ROLLBACK
31492
+  (0.4ms) BEGIN
31493
+  (0.7ms) COMMIT
31494
+  (0.5ms) BEGIN
31495
+  (0.7ms) ROLLBACK
31496
+  (0.5ms) BEGIN
31497
+  (0.5ms) COMMIT
31498
+  (2.2ms) BEGIN
31499
+  (0.5ms) ROLLBACK
31500
+  (0.5ms) BEGIN
31501
+  (0.5ms) COMMIT
31502
+  (0.4ms) BEGIN
31503
+  (0.4ms) ROLLBACK
31504
+  (0.3ms) BEGIN
31505
+  (0.4ms) COMMIT
31506
+  (0.4ms) BEGIN
31507
+  (0.4ms) ROLLBACK
@@ -4,20 +4,40 @@ module BloomRemit
4
4
  module Txns
5
5
  RSpec.describe HandleResponse do
6
6
 
7
- let(:remote_response) do
8
- build(:bloom_remit_client_create_payment_response, {
9
- body: {"i" => "am body"},
10
- })
7
+ context "successful response" do
8
+ let(:remote_response) do
9
+ build(:bloom_remit_client_create_payment_response, {
10
+ success: true,
11
+ body: {"i" => "am body"},
12
+ })
13
+ end
14
+ let(:txn) { create(:txn) }
15
+
16
+ it "saves the response" do
17
+ resulting_ctx = described_class.
18
+ execute(txn: txn, remote_response: remote_response)
19
+ expect(txn.responses.count).to eq 1
20
+ expect(txn.responses.first).to eq resulting_ctx.response
21
+ response = resulting_ctx.response
22
+ expect(response.body).to eq({"i" => "am body"})
23
+ end
11
24
  end
12
- let(:txn) { create(:txn) }
13
25
 
14
- it "saves the response" do
15
- resulting_ctx = described_class.
16
- execute(txn: txn, remote_response: remote_response)
17
- expect(txn.responses.count).to eq 1
18
- expect(txn.responses.first).to eq resulting_ctx.response
19
- response = resulting_ctx.response
20
- expect(response.body).to eq({"i" => "am body"})
26
+ context "unsuccessful response" do
27
+ let(:remote_response) do
28
+ build(:bloom_remit_client_create_payment_response, {
29
+ success: false,
30
+ body: {"status"=>"500", "error"=>"Internal Server Error"},
31
+ })
32
+ end
33
+ let(:txn) { create(:txn) }
34
+
35
+ it "marks the txn as error" do
36
+ resulting_ctx = described_class.
37
+ execute(txn: txn, remote_response: remote_response)
38
+ txn.reload
39
+ expect(txn).to be_error
40
+ end
21
41
  end
22
42
 
23
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloom_remit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-31 00:00:00.000000000 Z
11
+ date: 2016-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.1
61
+ version: 0.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 0.3.1
68
+ version: 0.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sidekiq
71
71
  requirement: !ruby/object:Gem::Requirement