plaid_rails 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: de35214c4950877d21fe26e73df733462b2e047f
4
+ data.tar.gz: 7845f1e4bac8b37fb5dec185b4608c6f243db918
5
+ SHA512:
6
+ metadata.gz: 638b199bf4b3eb151920383f3c5492e9421001ffdb88e4a2d2d2789a2131eec360c02167fb794344ac41c73058bc2bbbb649916f3b594186ba8c13d90bc03415
7
+ data.tar.gz: a4246246455405916327cf843db82bb5a692a78119a26363e1f282149039f80fe240d4a192a35037fd4019e0e5245ba2bb5de29f6cf4ad5bea340b5bbbfc3fcf
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # Plaid for Rails
2
+
3
+ [ ![Codeship Status for cdwilhelm/plaid_rails](https://codeship.com/projects/0ffcd970-b638-0133-0560-5ef9b905983d/status?branch=master)](https://codeship.com/projects/134308)
4
+
5
+ This gem is a Rails Engine to provide an interface to [Plaid](http://plaid.com) using the plaid-ruby api
6
+
7
+ PlaidRails provides these features:
8
+
9
+ * Accepts webhooks callbacks from plaid to manage transaction requests or errors
10
+ * Configures Plaid Link to easily connect with the banks
11
+ * Stores bank details to use within your application
12
+
13
+ ## Installation
14
+
15
+ Add the gem to your app
16
+
17
+ ```ruby
18
+ gem 'plaid_rails'
19
+ ```
20
+
21
+ Run the installer
22
+ ```bash
23
+ bundle install
24
+ rails g plaid_rails:install
25
+ rake db:migrate
26
+ ```
27
+
28
+ The plaid_rails:install task does the following:
29
+
30
+ * add the plaid_rails engine to the config/routes.rb
31
+ config/initializer/plaid.rb
32
+ ```ruby
33
+ mount PlaidRails::Engine => '/plaid', as: :plaid_rails` to the config/routes.rb
34
+ ```
35
+ * Create the initializer config/initializer/plaid.rb. Be sure to update this with your settings
36
+ * Update the app/assets/javascript/application.js with `//= require plaid_rails`
37
+
38
+
39
+ ### Views
40
+
41
+ Add a button and javascript to your view to use [Link](https://plaid.com/docs/#link) with Plaid.
42
+
43
+ ```ruby
44
+ <button id="plaidLinkButton" class="small"
45
+ data-client-name="<%= client_name %>"
46
+ data-env="<%= Rails.env.production? ? "production" : "tartan"%>"
47
+ data-key="<%= PlaidRails.public_key %>"
48
+ data-webhook="<%= PlaidRails.webhook %>"
49
+ data-longtail="<%= PlaidRails.longtail %>"
50
+ data-owner-type="<%= owner.class.name %>"
51
+ data-owner-id="<%= owner.id %>">Link your Bank Account</button>
52
+
53
+ <!-- put at bottom of page -->
54
+ <%=javascript_include_tag "https://cdn.plaid.com/link/stable/link-initialize.js" %>
55
+ ```
56
+
57
+ Overwrite the plaid_rails views with your own views.
58
+ * plaid_rails/accounts/create.html - rendered after creating an account
59
+ * plaid_rails/accounts/destroy.html - rendered after removing an account
60
+ * plaid_rails/accounts/index.html - renders the list of accounts connected
61
+ * plaid_rails/accounts/new.html - renders list of available accounts to connect
62
+ * plaid_rails/link/authenticate.js.erb - renders after the Plaid.create javascript function is successful
63
+
64
+ ### Webhooks
65
+ The plaid webhooks runs subscribers for to process transactions and report errors.
66
+
67
+ * transactions.initial - code 0
68
+ * transactions.new - code 1
69
+ * transactions.interval - code 2
70
+ * transactions.removed - code 3
71
+ * webhook.updated - code 4
72
+ * plaid.error - any other code
73
+
74
+ Update the PlaidRails.configuration.webhook with the address of the webhook url. The route is `plaid/webhook`
75
+ i.e. http(s)://my.app.com/plaid/webhooks
@@ -2,9 +2,27 @@ module PlaidRails
2
2
  class Account < ActiveRecord::Base
3
3
  belongs_to :owner, polymorphic: true, foreign_key: :owner_id
4
4
 
5
+ before_destroy :delete_connect
6
+
5
7
  validates :plaid_id, presence: true
6
8
  validates :name, presence: true
7
9
  validates :access_token, presence: true
8
10
  validates :plaid_type, presence: true
11
+
12
+ private
13
+
14
+ # delete token from Plaid if there are no more accounts for this token
15
+ def delete_connect
16
+ token = self.access_token
17
+ begin
18
+ if PlaidRails::Account.where(access_token: token).size == 1
19
+ Plaid::Connection.delete('connect', { access_token: token})
20
+ end
21
+ rescue => e
22
+ message = "Unable to delete token #{token}"
23
+ Rails.logger.error "#{message}: #{e.message}"
24
+ Rails.logger.error e.backtrace.join("\n")
25
+ end
26
+ end
9
27
  end
10
28
  end
@@ -1,3 +1,3 @@
1
1
  module PlaidRails
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -2758,3 +2758,684 @@ Processing by PlaidRails::WebhooksController#create as HTML
2758
2758
  Parameters: {"webhook"=>{"code"=>"0", "message"=>"hello", "access_token"=>"test_wells"}}
2759
2759
  Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms)
2760
2760
   (0.1ms) rollback transaction
2761
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
2762
+  (0.1ms) begin transaction
2763
+ PlaidRails::Account Exists (0.3ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK' LIMIT 1
2764
+  (0.1ms) SAVEPOINT active_record_1
2765
+ SQL (1.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 1203.42], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:34.974884"], ["current_balance", 1274.93], ["name", "Plaid Savings"], ["number", 9606], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:34.974884"]]
2766
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2767
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy' LIMIT 1
2768
+  (0.1ms) SAVEPOINT active_record_1
2769
+ SQL (0.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 1081.78], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:37.591817"], ["current_balance", 1253.32], ["name", "Plaid Checking"], ["number", 1702], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:37.591817"]]
2770
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2771
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'XARE85EJqKsjxLp6XR8ocg8VakrkXpTXmRdOo' LIMIT 1
2772
+  (0.1ms) SAVEPOINT active_record_1
2773
+ SQL (0.2ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 7205.23], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:40.256636"], ["current_balance", 7255.23], ["name", "Plaid Premier Checking"], ["number", 5204], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "XARE85EJqKsjxLp6XR8ocg8VakrkXpTXmRdOo"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:40.256636"]]
2774
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2775
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'pJPM4LMBNQFrOwp0jqEyTwyxJQrQbgU6kq37k' LIMIT 1
2776
+  (0.1ms) SAVEPOINT active_record_1
2777
+ SQL (0.1ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 9930.0], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:42.364586"], ["current_balance", 2275.58], ["name", "Plaid Credit Card"], ["number", 3002], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "pJPM4LMBNQFrOwp0jqEyTwyxJQrQbgU6kq37k"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:42.364586"]]
2778
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2779
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."owner_id" = 1 AND "plaid_rails_accounts"."owner_type" = 'User'
2780
+  (0.5ms) rollback transaction
2781
+  (0.1ms) begin transaction
2782
+  (0.1ms) SAVEPOINT active_record_1
2783
+ SQL (0.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:42.376493"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:02:42.376493"]]
2784
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2785
+ Processing by PlaidRails::LinkController#update as JS
2786
+ Parameters: {"public_token"=>"test,wells,connected", "name"=>"Wells Fargo", "type"=>"wells", "owner_id"=>"1", "owner_type"=>"User"}
2787
+ PlaidRails::Account Load (0.3ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."owner_type" = 'User' AND "plaid_rails_accounts"."owner_id" = 1
2788
+  (0.1ms) SAVEPOINT active_record_1
2789
+  (0.1ms) RELEASE SAVEPOINT active_record_1
2790
+ Rendered /Users/cwilhelm/NetBeansProjects/plaid_rails/app/views/plaid_rails/link/update.js.erb (0.4ms)
2791
+ Completed 200 OK in 798ms (Views: 46.7ms | ActiveRecord: 0.4ms)
2792
+  (0.5ms) rollback transaction
2793
+  (0.0ms) begin transaction
2794
+ Processing by PlaidRails::LinkController#authenticate as JS
2795
+ Parameters: {"public_token"=>"test,wells,connected", "name"=>"Wells Fargo", "type"=>"wells", "owner_id"=>"1", "owner_type"=>"User"}
2796
+ Completed 200 OK in 500ms (Views: 33.7ms | ActiveRecord: 0.0ms)
2797
+  (0.1ms) rollback transaction
2798
+  (0.0ms) begin transaction
2799
+ Processing by PlaidRails::LinkController#authenticate as HTML
2800
+ Error: unauthorized product
2801
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid/connection.rb:83:in `parse_response'
2802
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid/connection.rb:17:in `post'
2803
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid.rb:44:in `exchange_token'
2804
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/controllers/plaid_rails/link_controller.rb:8:in `authenticate'
2805
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2806
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:189:in `process_action'
2807
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
2808
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2809
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:82:in `run_callbacks'
2810
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
2811
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
2812
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
2813
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `block in instrument'
2814
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2815
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `instrument'
2816
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2817
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2818
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2819
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:136:in `process'
2820
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionview-4.1.14.1/lib/action_view/rendering.rb:30:in `process'
2821
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:595:in `process'
2822
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:64:in `process'
2823
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:501:in `post'
2824
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:193:in `block in matches?'
2825
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/doublespeak/world.rb:12:in `with_doubles_activated'
2826
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/2.2.0/forwardable.rb:183:in `with_doubles_activated'
2827
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:192:in `matches?'
2828
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-expectations-2.99.2/lib/rspec/expectations/handler.rb:24:in `handle_matcher'
2829
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/memoized_helpers.rb:77:in `should'
2830
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/spec/controllers/plaid_rails/link_controller_spec.rb:31:in `block (2 levels) in <module:PlaidRails>'
2831
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2832
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2833
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
2834
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `call'
2835
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `block (2 levels) in <module:ControllerExampleGroup>'
2836
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2837
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2838
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
2839
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
2840
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `call'
2841
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `run'
2842
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:69:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
2843
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2844
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2845
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
2846
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
2847
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `call'
2848
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `run'
2849
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:446:in `run_hook'
2850
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:463:in `run_around_each_hooks'
2851
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:250:in `with_around_each_hooks'
2852
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
2853
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
2854
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
2855
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
2856
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
2857
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
2858
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
2859
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
2860
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
2861
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
2862
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
2863
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
2864
+ Completed 500 Internal Server Error in 564ms (Views: 3.9ms | ActiveRecord: 0.0ms)
2865
+  (0.1ms) rollback transaction
2866
+  (0.1ms) begin transaction
2867
+ Processing by PlaidRails::LinkController#update as HTML
2868
+ Error: unauthorized product
2869
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid/connection.rb:83:in `parse_response'
2870
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid/connection.rb:17:in `post'
2871
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid.rb:44:in `exchange_token'
2872
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/controllers/plaid_rails/link_controller.rb:21:in `update'
2873
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2874
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:189:in `process_action'
2875
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
2876
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2877
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:82:in `run_callbacks'
2878
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
2879
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
2880
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
2881
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `block in instrument'
2882
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2883
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `instrument'
2884
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2885
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2886
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2887
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:136:in `process'
2888
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionview-4.1.14.1/lib/action_view/rendering.rb:30:in `process'
2889
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:595:in `process'
2890
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:64:in `process'
2891
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:501:in `post'
2892
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:193:in `block in matches?'
2893
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/doublespeak/world.rb:12:in `with_doubles_activated'
2894
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/2.2.0/forwardable.rb:183:in `with_doubles_activated'
2895
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/shoulda-matchers-2.8.0/lib/shoulda/matchers/action_controller/strong_parameters_matcher.rb:192:in `matches?'
2896
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-expectations-2.99.2/lib/rspec/expectations/handler.rb:24:in `handle_matcher'
2897
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/memoized_helpers.rb:77:in `should'
2898
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/spec/controllers/plaid_rails/link_controller_spec.rb:34:in `block (2 levels) in <module:PlaidRails>'
2899
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2900
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2901
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
2902
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `call'
2903
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `block (2 levels) in <module:ControllerExampleGroup>'
2904
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2905
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2906
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
2907
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
2908
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `call'
2909
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `run'
2910
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:69:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
2911
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2912
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2913
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
2914
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
2915
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `call'
2916
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `run'
2917
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:446:in `run_hook'
2918
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:463:in `run_around_each_hooks'
2919
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:250:in `with_around_each_hooks'
2920
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
2921
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
2922
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
2923
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
2924
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
2925
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
2926
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
2927
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
2928
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
2929
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
2930
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
2931
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
2932
+ Completed 500 Internal Server Error in 657ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2933
+  (0.1ms) rollback transaction
2934
+  (0.2ms) begin transaction
2935
+ Processing by PlaidRails::LinkController#authenticate as JS
2936
+ Parameters: {"public_token"=>"badtoken", "name"=>"Wells Fargo", "type"=>"wells", "owner_id"=>"1", "owner_type"=>"User"}
2937
+ Error: unauthorized product
2938
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid/connection.rb:83:in `parse_response'
2939
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid/connection.rb:17:in `post'
2940
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/plaid-1.7.1/lib/plaid.rb:44:in `exchange_token'
2941
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/controllers/plaid_rails/link_controller.rb:8:in `authenticate'
2942
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
2943
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:189:in `process_action'
2944
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
2945
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
2946
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:82:in `run_callbacks'
2947
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
2948
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
2949
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
2950
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `block in instrument'
2951
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
2952
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `instrument'
2953
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
2954
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
2955
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
2956
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:136:in `process'
2957
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionview-4.1.14.1/lib/action_view/rendering.rb:30:in `process'
2958
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:595:in `process'
2959
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:64:in `process'
2960
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:501:in `post'
2961
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:531:in `xml_http_request'
2962
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/spec/controllers/plaid_rails/link_controller_spec.rb:15:in `block (2 levels) in <module:PlaidRails>'
2963
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2964
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2965
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
2966
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `call'
2967
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `block (2 levels) in <module:ControllerExampleGroup>'
2968
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2969
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2970
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
2971
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
2972
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `call'
2973
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `run'
2974
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:69:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
2975
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
2976
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
2977
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
2978
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
2979
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `call'
2980
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `run'
2981
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:446:in `run_hook'
2982
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:463:in `run_around_each_hooks'
2983
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:250:in `with_around_each_hooks'
2984
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
2985
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
2986
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
2987
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
2988
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
2989
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
2990
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
2991
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
2992
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
2993
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
2994
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
2995
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
2996
+ Completed 500 Internal Server Error in 713ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2997
+  (0.1ms) rollback transaction
2998
+  (0.1ms) begin transaction
2999
+  (0.1ms) rollback transaction
3000
+  (0.1ms) begin transaction
3001
+  (0.1ms) rollback transaction
3002
+  (0.0ms) begin transaction
3003
+  (0.0ms) rollback transaction
3004
+  (0.0ms) begin transaction
3005
+  (0.1ms) rollback transaction
3006
+  (0.1ms) begin transaction
3007
+  (0.0ms) rollback transaction
3008
+  (0.0ms) begin transaction
3009
+  (0.1ms) rollback transaction
3010
+  (0.1ms) begin transaction
3011
+  (0.0ms) rollback transaction
3012
+  (0.0ms) begin transaction
3013
+  (0.1ms) rollback transaction
3014
+  (0.1ms) begin transaction
3015
+  (0.1ms) SAVEPOINT active_record_1
3016
+ SQL (0.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:45.674597"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:02:45.674597"]]
3017
+  (0.2ms) RELEASE SAVEPOINT active_record_1
3018
+ Processing by PlaidRails::AccountsController#destroy as HTML
3019
+ Parameters: {"id"=>"1"}
3020
+ PlaidRails::Account Load (0.2ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? LIMIT 1 [["id", 1]]
3021
+  (0.0ms) SAVEPOINT active_record_1
3022
+ Unable to delete Plaid::User for: 1: uninitialized constant PlaidRails::Account::PlaidRais
3023
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/models/plaid_rails/account.rb:18:in `delete_connect'
3024
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:429:in `block in make_lambda'
3025
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:161:in `call'
3026
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:161:in `block in halting'
3027
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:501:in `call'
3028
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:501:in `block in call'
3029
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:501:in `each'
3030
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:501:in `call'
3031
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:86:in `run_callbacks'
3032
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/callbacks.rb:292:in `destroy'
3033
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/transactions.rb:263:in `block in destroy'
3034
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/transactions.rb:329:in `block in with_transaction_returning_status'
3035
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
3036
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
3037
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
3038
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/transactions.rb:208:in `transaction'
3039
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/transactions.rb:326:in `with_transaction_returning_status'
3040
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/transactions.rb:263:in `destroy'
3041
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/controllers/plaid_rails/accounts_controller.rb:29:in `destroy'
3042
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
3043
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:189:in `process_action'
3044
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rendering.rb:10:in `process_action'
3045
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
3046
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/callbacks.rb:82:in `run_callbacks'
3047
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/callbacks.rb:19:in `process_action'
3048
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/rescue.rb:29:in `process_action'
3049
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
3050
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `block in instrument'
3051
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
3052
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activesupport-4.1.14.1/lib/active_support/notifications.rb:159:in `instrument'
3053
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
3054
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
3055
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/activerecord-4.1.14.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
3056
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/abstract_controller/base.rb:136:in `process'
3057
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionview-4.1.14.1/lib/action_view/rendering.rb:30:in `process'
3058
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:595:in `process'
3059
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:64:in `process'
3060
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/actionpack-4.1.14.1/lib/action_controller/test_case.rb:519:in `delete'
3061
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/spec/controllers/plaid_rails/accounts_controller_spec.rb:35:in `block (2 levels) in <module:PlaidRails>'
3062
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3063
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3064
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
3065
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `call'
3066
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/example/controller_example_group.rb:183:in `block (2 levels) in <module:ControllerExampleGroup>'
3067
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3068
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3069
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
3070
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
3071
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `call'
3072
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `run'
3073
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:69:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
3074
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3075
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3076
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
3077
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
3078
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `call'
3079
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `run'
3080
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:446:in `run_hook'
3081
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:463:in `run_around_each_hooks'
3082
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:250:in `with_around_each_hooks'
3083
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
3084
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
3085
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
3086
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
3087
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
3088
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
3089
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
3090
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
3091
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
3092
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
3093
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
3094
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
3095
+ SQL (0.6ms) DELETE FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? [["id", 1]]
3096
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3097
+ Completed 200 OK in 22ms (Views: 12.3ms | ActiveRecord: 0.8ms)
3098
+  (0.7ms) rollback transaction
3099
+  (0.1ms) begin transaction
3100
+ Processing by PlaidRails::AccountsController#create as HTML
3101
+ Parameters: {"account"=>{"access_token"=>"test_wells", "account_ids"=>["QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy", "XARE85EJqKsjxLp6XR8ocg8VakrkXpTXmRdOo", "pJPM4LMBNQFrOwp0jqEyTwyxJQrQbgU6kq37k"], "name"=>"Wells Fargo", "type"=>"wells", "owner_id"=>"1", "owner_type"=>"User", "token"=>"test,wells,connected"}}
3102
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK' LIMIT 1
3103
+  (0.1ms) SAVEPOINT active_record_1
3104
+ SQL (0.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 1203.42], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:47.513072"], ["current_balance", 1274.93], ["name", "Plaid Savings"], ["number", 9606], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "QPO8Jo8vdDHMepg41PBwckXm4KdK1yUdmXOwK"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:47.513072"]]
3105
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3106
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy' LIMIT 1
3107
+  (0.1ms) SAVEPOINT active_record_1
3108
+ SQL (0.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 1081.78], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:49.292133"], ["current_balance", 1253.32], ["name", "Plaid Checking"], ["number", 1702], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:49.292133"]]
3109
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3110
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'XARE85EJqKsjxLp6XR8ocg8VakrkXpTXmRdOo' LIMIT 1
3111
+  (0.1ms) SAVEPOINT active_record_1
3112
+ SQL (0.1ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 7205.23], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:51.213975"], ["current_balance", 7255.23], ["name", "Plaid Premier Checking"], ["number", 5204], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "XARE85EJqKsjxLp6XR8ocg8VakrkXpTXmRdOo"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:51.213975"]]
3113
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3114
+ PlaidRails::Account Exists (0.2ms) SELECT 1 AS one FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."plaid_id" = 'pJPM4LMBNQFrOwp0jqEyTwyxJQrQbgU6kq37k' LIMIT 1
3115
+  (0.1ms) SAVEPOINT active_record_1
3116
+ SQL (0.2ms) INSERT INTO "plaid_rails_accounts" ("access_token", "available_balance", "bank_name", "created_at", "current_balance", "name", "number", "owner_id", "owner_type", "plaid_id", "plaid_type", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["available_balance", 9930.0], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:52.668826"], ["current_balance", 2275.58], ["name", "Plaid Credit Card"], ["number", 3002], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "pJPM4LMBNQFrOwp0jqEyTwyxJQrQbgU6kq37k"], ["plaid_type", "wells"], ["token", "test,wells,connected"], ["updated_at", "2016-05-11 12:02:52.668826"]]
3117
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3118
+ Completed 200 OK in 6402ms (Views: 4.2ms | ActiveRecord: 2.9ms)
3119
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."owner_id" = 1 AND "plaid_rails_accounts"."owner_type" = 'User'
3120
+ PlaidRails::Account Load (0.2ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."owner_id" = 1 AND "plaid_rails_accounts"."owner_type" = 'User' ORDER BY "plaid_rails_accounts"."id" ASC LIMIT 1
3121
+  (0.9ms) rollback transaction
3122
+  (0.1ms) begin transaction
3123
+ Processing by PlaidRails::AccountsController#new as HTML
3124
+ Parameters: {"account"=>{"access_token"=>"test_wells", "name"=>"Wells Fargo", "type"=>"wells", "owner_id"=>"1", "owner_type"=>"User"}}
3125
+ Completed 200 OK in 676ms (Views: 6.1ms | ActiveRecord: 0.0ms)
3126
+  (0.1ms) rollback transaction
3127
+  (0.0ms) begin transaction
3128
+ Processing by PlaidRails::AccountsController#index as HTML
3129
+ Parameters: {"account"=>{"owner_id"=>"1"}}
3130
+ Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.0ms)
3131
+  (0.1ms) SAVEPOINT active_record_1
3132
+ SQL (0.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:02:53.374466"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:02:53.374466"]]
3133
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3134
+ PlaidRails::Account Load (0.2ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."owner_id" = 1
3135
+  (0.5ms) rollback transaction
3136
+  (0.1ms) begin transaction
3137
+  (0.1ms) rollback transaction
3138
+  (0.1ms) begin transaction
3139
+  (0.1ms) rollback transaction
3140
+  (0.0ms) begin transaction
3141
+  (0.1ms) rollback transaction
3142
+  (0.1ms) begin transaction
3143
+  (0.1ms) SAVEPOINT active_record_1
3144
+ SQL (2.7ms) INSERT INTO "plaid_rails_webhooks" ("access_token", "code", "created_at", "message", "updated_at") VALUES (?, ?, ?, ?, ?) [["access_token", "123abc"], ["code", 0], ["created_at", "2016-05-11 12:02:53.406837"], ["message", "hello"], ["updated_at", "2016-05-11 12:02:53.406837"]]
3145
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3146
+  (0.4ms) rollback transaction
3147
+  (0.1ms) begin transaction
3148
+ Processing by PlaidRails::WebhooksController#create as HTML
3149
+ Parameters: {"webhook"=>{"code"=>"0", "message"=>"hello", "access_token"=>"test_wells"}}
3150
+ Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)
3151
+  (0.1ms) rollback transaction
3152
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3153
+  (0.1ms) begin transaction
3154
+  (0.1ms) rollback transaction
3155
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3156
+  (0.1ms) begin transaction
3157
+  (0.1ms) SAVEPOINT active_record_1
3158
+ SQL (2.9ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:05:09.907585"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:05:09.907585"]]
3159
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3160
+ Unable to delete Plaid::User for: 1: uninitialized constant PlaidRails::Account::PlaidRais
3161
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/models/plaid_rails/account.rb:18:in `delete_connect'
3162
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/spec/models/plaid_rails/account_spec.rb:31:in `block (2 levels) in <module:PlaidRails>'
3163
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3164
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3165
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
3166
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `call'
3167
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `run'
3168
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:69:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
3169
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3170
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3171
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
3172
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
3173
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `call'
3174
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `run'
3175
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:446:in `run_hook'
3176
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:463:in `run_around_each_hooks'
3177
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:250:in `with_around_each_hooks'
3178
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
3179
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
3180
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
3181
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
3182
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
3183
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
3184
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
3185
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
3186
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
3187
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
3188
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
3189
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
3190
+  (0.7ms) rollback transaction
3191
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3192
+  (0.1ms) begin transaction
3193
+  (0.1ms) rollback transaction
3194
+  (0.0ms) begin transaction
3195
+  (0.1ms) SAVEPOINT active_record_1
3196
+ SQL (1.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:06:07.046390"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:06:07.046390"]]
3197
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3198
+  (0.0ms) SAVEPOINT active_record_1
3199
+ SQL (1.0ms) DELETE FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? [["id", 1]]
3200
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3201
+  (0.6ms) rollback transaction
3202
+  (0.0ms) begin transaction
3203
+  (0.1ms) SAVEPOINT active_record_1
3204
+ SQL (0.3ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:06:07.058132"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:06:07.058132"]]
3205
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3206
+  (0.3ms) SAVEPOINT active_record_1
3207
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:06:07.062659"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:06:07.062659"]]
3208
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3209
+  (0.7ms) rollback transaction
3210
+  (0.1ms) begin transaction
3211
+  (0.1ms) rollback transaction
3212
+  (0.2ms) begin transaction
3213
+  (0.1ms) rollback transaction
3214
+  (0.1ms) begin transaction
3215
+  (0.1ms) rollback transaction
3216
+  (0.1ms) begin transaction
3217
+  (0.0ms) SAVEPOINT active_record_1
3218
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:06:07.097536"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:06:07.097536"]]
3219
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3220
+ Unable to delete Plaid::User for: 1: uninitialized constant PlaidRails::Account::PlaidRais
3221
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/app/models/plaid_rails/account.rb:18:in `delete_connect'
3222
+ /Users/cwilhelm/NetBeansProjects/plaid_rails/spec/models/plaid_rails/account_spec.rb:30:in `block (2 levels) in <module:PlaidRails>'
3223
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3224
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3225
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'
3226
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `call'
3227
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:178:in `run'
3228
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-rails-2.99.0/lib/rspec/rails/adapters.rb:69:in `block (2 levels) in <module:MinitestLifecycleAdapter>'
3229
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
3230
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
3231
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:241:in `instance_eval_with_args'
3232
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
3233
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `call'
3234
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:108:in `run'
3235
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/hooks.rb:446:in `run_hook'
3236
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:463:in `run_around_each_hooks'
3237
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:250:in `with_around_each_hooks'
3238
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'
3239
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'
3240
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'
3241
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'
3242
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'
3243
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'
3244
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'
3245
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'
3246
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'
3247
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'
3248
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'
3249
+ /Users/cwilhelm/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'
3250
+  (0.5ms) rollback transaction
3251
+  (0.0ms) begin transaction
3252
+  (0.0ms) rollback transaction
3253
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
3254
+  (0.1ms) begin transaction
3255
+  (0.1ms) rollback transaction
3256
+  (0.1ms) begin transaction
3257
+  (0.1ms) rollback transaction
3258
+  (0.0ms) begin transaction
3259
+  (0.1ms) SAVEPOINT active_record_1
3260
+ SQL (9.9ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:10:03.637115"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:10:03.637115"]]
3261
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3262
+  (0.0ms) SAVEPOINT active_record_1
3263
+ SQL (0.5ms) DELETE FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? [["id", 1]]
3264
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3265
+  (1.0ms) rollback transaction
3266
+  (0.1ms) begin transaction
3267
+  (0.1ms) rollback transaction
3268
+  (0.0ms) begin transaction
3269
+  (0.1ms) rollback transaction
3270
+  (0.0ms) begin transaction
3271
+  (0.1ms) rollback transaction
3272
+  (0.0ms) begin transaction
3273
+  (0.0ms) SAVEPOINT active_record_1
3274
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:10:03.673898"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:10:03.673898"]]
3275
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3276
+  (0.1ms) SAVEPOINT active_record_1
3277
+ SQL (0.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:10:03.682562"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:10:03.682562"]]
3278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3279
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3280
+  (0.7ms) rollback transaction
3281
+  (0.0ms) begin transaction
3282
+  (0.1ms) SAVEPOINT active_record_1
3283
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:10:03.695326"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:10:03.695326"]]
3284
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3285
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3286
+  (0.5ms) rollback transaction
3287
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3288
+  (0.1ms) begin transaction
3289
+  (0.1ms) SAVEPOINT active_record_1
3290
+ SQL (1.3ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:12:38.128722"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:12:38.128722"]]
3291
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3292
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3293
+  (0.4ms) rollback transaction
3294
+  (0.1ms) begin transaction
3295
+  (0.1ms) rollback transaction
3296
+  (0.1ms) begin transaction
3297
+  (0.1ms) rollback transaction
3298
+  (0.0ms) begin transaction
3299
+  (0.1ms) rollback transaction
3300
+  (0.0ms) begin transaction
3301
+  (0.0ms) rollback transaction
3302
+  (0.0ms) begin transaction
3303
+  (0.1ms) SAVEPOINT active_record_1
3304
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:12:38.169589"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:12:38.169589"]]
3305
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3306
+  (0.0ms) SAVEPOINT active_record_1
3307
+ SQL (0.4ms) DELETE FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? [["id", 1]]
3308
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3309
+  (0.6ms) rollback transaction
3310
+  (0.1ms) begin transaction
3311
+  (0.1ms) rollback transaction
3312
+  (0.0ms) begin transaction
3313
+  (0.1ms) SAVEPOINT active_record_1
3314
+ SQL (0.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:12:38.182604"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:12:38.182604"]]
3315
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3316
+  (0.1ms) SAVEPOINT active_record_1
3317
+ SQL (0.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:12:38.186018"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:12:38.186018"]]
3318
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3319
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3320
+  (0.7ms) rollback transaction
3321
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3322
+  (0.1ms) begin transaction
3323
+  (0.1ms) SAVEPOINT active_record_1
3324
+ SQL (0.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:24.161115"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:24.161115"]]
3325
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3326
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3327
+  (2.3ms) rollback transaction
3328
+  (0.0ms) begin transaction
3329
+  (0.1ms) rollback transaction
3330
+  (0.0ms) begin transaction
3331
+  (0.0ms) rollback transaction
3332
+  (0.0ms) begin transaction
3333
+  (0.1ms) rollback transaction
3334
+  (0.1ms) begin transaction
3335
+  (0.1ms) rollback transaction
3336
+  (0.0ms) begin transaction
3337
+  (0.1ms) rollback transaction
3338
+  (0.0ms) begin transaction
3339
+  (0.0ms) SAVEPOINT active_record_1
3340
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:24.206814"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:24.206814"]]
3341
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3342
+  (0.1ms) SAVEPOINT active_record_1
3343
+ SQL (0.7ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:24.209882"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:24.209882"]]
3344
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3345
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3346
+  (0.7ms) rollback transaction
3347
+  (0.0ms) begin transaction
3348
+  (0.1ms) SAVEPOINT active_record_1
3349
+ SQL (0.3ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:24.215213"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:24.215213"]]
3350
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3351
+  (0.0ms) SAVEPOINT active_record_1
3352
+ SQL (0.4ms) DELETE FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? [["id", 1]]
3353
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3354
+  (0.8ms) rollback transaction
3355
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3356
+  (0.1ms) begin transaction
3357
+  (0.2ms) rollback transaction
3358
+  (0.1ms) begin transaction
3359
+  (0.0ms) rollback transaction
3360
+  (0.0ms) begin transaction
3361
+  (0.1ms) SAVEPOINT active_record_1
3362
+ SQL (0.7ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:49.949309"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:49.949309"]]
3363
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3364
+  (0.1ms) SAVEPOINT active_record_1
3365
+ SQL (0.4ms) DELETE FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."id" = ? [["id", 1]]
3366
+  (0.0ms) RELEASE SAVEPOINT active_record_1
3367
+  (0.7ms) rollback transaction
3368
+  (0.0ms) begin transaction
3369
+  (0.1ms) rollback transaction
3370
+  (0.0ms) begin transaction
3371
+  (0.1ms) rollback transaction
3372
+  (0.0ms) begin transaction
3373
+  (0.1ms) rollback transaction
3374
+  (0.0ms) begin transaction
3375
+  (0.1ms) SAVEPOINT active_record_1
3376
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:49.977399"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:49.977399"]]
3377
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3378
+ PlaidRails::Account Load (0.2ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts"
3379
+  (0.1ms) SAVEPOINT active_record_1
3380
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:49.983269"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:49.983269"]]
3381
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3382
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3383
+  (0.7ms) rollback transaction
3384
+  (0.0ms) begin transaction
3385
+  (0.0ms) SAVEPOINT active_record_1
3386
+ SQL (0.3ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:13:49.994305"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:13:49.994305"]]
3387
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3388
+  (0.1ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3389
+  (1.0ms) rollback transaction
3390
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3391
+  (0.1ms) begin transaction
3392
+  (0.1ms) SAVEPOINT active_record_1
3393
+ SQL (1.8ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:14:12.003775"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:14:12.003775"]]
3394
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3395
+ PlaidRails::Account Load (0.1ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts"
3396
+  (0.1ms) SAVEPOINT active_record_1
3397
+ SQL (0.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:14:12.035628"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:14:12.035628"]]
3398
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3399
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3400
+  (0.9ms) rollback transaction
3401
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3402
+  (0.1ms) begin transaction
3403
+  (0.1ms) SAVEPOINT active_record_1
3404
+ SQL (1.3ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:14:45.900648"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:14:45.900648"]]
3405
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3406
+  (0.1ms) SAVEPOINT active_record_1
3407
+ SQL (0.4ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:14:45.909338"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:14:45.909338"]]
3408
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3409
+ PlaidRails::Account Load (3.3ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts"
3410
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3411
+  (0.8ms) rollback transaction
3412
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3413
+  (0.1ms) begin transaction
3414
+  (0.2ms) SAVEPOINT active_record_1
3415
+ SQL (1.3ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:15:23.877030"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:15:23.877030"]]
3416
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3417
+  (2.1ms) SAVEPOINT active_record_1
3418
+ SQL (0.7ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:15:23.888994"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:15:23.888994"]]
3419
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3420
+ PlaidRails::Account Load (0.1ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts"
3421
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3422
+  (0.7ms) rollback transaction
3423
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
3424
+  (0.1ms) begin transaction
3425
+  (0.1ms) SAVEPOINT active_record_1
3426
+ SQL (1.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:16:06.119996"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:16:06.119996"]]
3427
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3428
+ PlaidRails::Account Load (0.1ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts"
3429
+  (0.7ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3430
+  (0.5ms) rollback transaction
3431
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
3432
+  (0.1ms) begin transaction
3433
+  (0.1ms) SAVEPOINT active_record_1
3434
+ SQL (1.5ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:16:55.423427"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:16:55.423427"]]
3435
+  (0.1ms) RELEASE SAVEPOINT active_record_1
3436
+  (0.1ms) SAVEPOINT active_record_1
3437
+ SQL (0.6ms) INSERT INTO "plaid_rails_accounts" ("access_token", "bank_name", "created_at", "name", "owner_id", "owner_type", "plaid_id", "plaid_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["access_token", "test_wells"], ["bank_name", "Wells Fargo"], ["created_at", "2016-05-11 12:16:55.432887"], ["name", "Wells Fargo Credit Card"], ["owner_id", 1], ["owner_type", "User"], ["plaid_id", "nban4wnPKEtnmEpaKzbYFYQvA7D7pnCaeDBMy"], ["plaid_type", "wells"], ["updated_at", "2016-05-11 12:16:55.432887"]]
3438
+  (8.3ms) RELEASE SAVEPOINT active_record_1
3439
+ PlaidRails::Account Load (0.2ms) SELECT "plaid_rails_accounts".* FROM "plaid_rails_accounts"
3440
+  (0.2ms) SELECT COUNT(*) FROM "plaid_rails_accounts" WHERE "plaid_rails_accounts"."access_token" = 'test_wells'
3441
+  (0.8ms) rollback transaction
@@ -7,5 +7,34 @@ module PlaidRails
7
7
  it { should validate_presence_of(:plaid_type)}
8
8
  it { should validate_presence_of(:name)}
9
9
  it { should belong_to(:owner).with_foreign_key(:owner_id)}
10
+
11
+ let(:account){FactoryGirl.create(:account)}
12
+
13
+ it "expect to call delete_connect" do
14
+ expect(account).to receive(:delete_connect)
15
+ account.destroy
16
+ end
17
+
18
+ it "delete connect with error" do
19
+ account = FactoryGirl.create(:account)
20
+ expect(Plaid::Connection).to receive(:delete).with('connect',
21
+ { access_token: 'test_wells'}).and_raise("boom")
22
+ expect(Rails.logger).to receive(:error).exactly(2).times
23
+ account.send(:delete_connect)
24
+ end
25
+
26
+ it "delete_connect" do
27
+ account = FactoryGirl.create(:account)
28
+ expect(Plaid::Connection).to receive(:delete).with('connect',
29
+ { access_token: 'test_wells'})
30
+ account.send(:delete_connect)
31
+ end
32
+
33
+ it "does not delete_connect" do
34
+ FactoryGirl.create(:account)
35
+ expect(Plaid::Connection).to_not receive(:delete).with('connect',
36
+ { access_token: 'test_wells'})
37
+ account.send(:delete_connect)
38
+ end
10
39
  end
11
40
  end
metadata CHANGED
@@ -1,158 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plaid_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Curt Wilhelm
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '4.1'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '4.1'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: jquery-rails
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: plaid
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: sqlite3
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec-rails
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: capybara
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: factory_girl_rails
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: shoulda-matchers
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - ">="
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - ">="
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: webmock
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
- - - ! '>='
129
+ - - ">="
148
130
  - !ruby/object:Gem::Version
149
131
  version: '0'
150
132
  type: :development
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
- - - ! '>='
136
+ - - ">="
156
137
  - !ruby/object:Gem::Version
157
138
  version: '0'
158
139
  description: A Rails Engine to work with Plaid
@@ -162,9 +143,12 @@ executables: []
162
143
  extensions: []
163
144
  extra_rdoc_files: []
164
145
  files:
146
+ - MIT-LICENSE
147
+ - README.md
148
+ - Rakefile
149
+ - app/assets/javascripts/plaid_rails.js
165
150
  - app/assets/javascripts/plaid_rails/application.js
166
151
  - app/assets/javascripts/plaid_rails/link.js
167
- - app/assets/javascripts/plaid_rails.js
168
152
  - app/assets/stylesheets/plaid_rails/application.css
169
153
  - app/controllers/plaid_rails/accounts_controller.rb
170
154
  - app/controllers/plaid_rails/application_controller.rb
@@ -190,17 +174,17 @@ files:
190
174
  - db/test.sqlite3
191
175
  - lib/generators/plaid_rails/install_generator.rb
192
176
  - lib/generators/plaid_rails/templates/initializer.rb
177
+ - lib/plaid_rails.rb
193
178
  - lib/plaid_rails/engine.rb
194
179
  - lib/plaid_rails/event.rb
195
180
  - lib/plaid_rails/version.rb
196
- - lib/plaid_rails.rb
197
181
  - lib/tasks/plaid_rails_tasks.rake
198
- - MIT-LICENSE
199
- - Rakefile
200
182
  - spec/controllers/plaid_rails/accounts_controller_spec.rb
201
183
  - spec/controllers/plaid_rails/application_controller_spec.rb
202
184
  - spec/controllers/plaid_rails/link_controller_spec.rb
203
185
  - spec/controllers/plaid_rails/webhooks_controller_spec.rb
186
+ - spec/dummy/README.rdoc
187
+ - spec/dummy/Rakefile
204
188
  - spec/dummy/app/assets/javascripts/application.js
205
189
  - spec/dummy/app/assets/stylesheets/application.css
206
190
  - spec/dummy/app/controllers/application_controller.rb
@@ -209,6 +193,7 @@ files:
209
193
  - spec/dummy/bin/bundle
210
194
  - spec/dummy/bin/rails
211
195
  - spec/dummy/bin/rake
196
+ - spec/dummy/config.ru
212
197
  - spec/dummy/config/application.rb
213
198
  - spec/dummy/config/boot.rb
214
199
  - spec/dummy/config/database.yml
@@ -227,7 +212,6 @@ files:
227
212
  - spec/dummy/config/locales/en.yml
228
213
  - spec/dummy/config/routes.rb
229
214
  - spec/dummy/config/secrets.yml
230
- - spec/dummy/config.ru
231
215
  - spec/dummy/db/development.sqlite3
232
216
  - spec/dummy/db/schema.rb
233
217
  - spec/dummy/db/test.sqlite3
@@ -237,8 +221,6 @@ files:
237
221
  - spec/dummy/public/422.html
238
222
  - spec/dummy/public/500.html
239
223
  - spec/dummy/public/favicon.ico
240
- - spec/dummy/Rakefile
241
- - spec/dummy/README.rdoc
242
224
  - spec/factories/account.rb
243
225
  - spec/factories/webhook.rb
244
226
  - spec/models/plaid_rails/account_spec.rb
@@ -249,27 +231,26 @@ files:
249
231
  homepage: https://github.com/cdwilhelm/plaid_rails
250
232
  licenses:
251
233
  - MIT
234
+ metadata: {}
252
235
  post_install_message:
253
236
  rdoc_options: []
254
237
  require_paths:
255
238
  - lib
256
239
  required_ruby_version: !ruby/object:Gem::Requirement
257
- none: false
258
240
  requirements:
259
- - - ! '>='
241
+ - - ">="
260
242
  - !ruby/object:Gem::Version
261
243
  version: '0'
262
244
  required_rubygems_version: !ruby/object:Gem::Requirement
263
- none: false
264
245
  requirements:
265
- - - ! '>='
246
+ - - ">="
266
247
  - !ruby/object:Gem::Version
267
248
  version: '0'
268
249
  requirements: []
269
250
  rubyforge_project:
270
- rubygems_version: 1.8.23.2
251
+ rubygems_version: 2.4.5
271
252
  signing_key:
272
- specification_version: 3
253
+ specification_version: 4
273
254
  summary: A Rails Engine to work with Plaid
274
255
  test_files:
275
256
  - spec/controllers/plaid_rails/accounts_controller_spec.rb