plaid_rails 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/plaid_rails/accounts_controller.rb +4 -3
- data/app/controllers/plaid_rails/link_controller.rb +2 -2
- data/app/models/plaid_rails/account.rb +2 -1
- data/app/services/plaid_rails/create_account_service.rb +4 -2
- data/lib/plaid_rails/version.rb +1 -1
- data/spec/controllers/plaid_rails/accounts_controller_spec.rb +1 -1
- data/spec/controllers/plaid_rails/link_controller_spec.rb +1 -1
- data/spec/dummy/log/test.log +3899 -0
- data/spec/models/plaid_rails/account_spec.rb +5 -6
- data/spec/services/plaid_rails/create_account_service_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- metadata +6 -6
@@ -17,23 +17,22 @@ module PlaidRails
|
|
17
17
|
|
18
18
|
it "delete connect with error" do
|
19
19
|
account = FactoryGirl.create(:account)
|
20
|
-
expect(Plaid::
|
21
|
-
{ access_token: 'test_wells'}).and_raise("boom")
|
20
|
+
expect(Plaid::User).to receive(:load).with(:connect, "test_wells").and_raise("boom")
|
22
21
|
expect(Rails.logger).to receive(:error).exactly(2).times
|
23
22
|
account.send(:delete_connect)
|
24
23
|
end
|
25
24
|
|
26
25
|
it "delete_connect" do
|
27
26
|
account = FactoryGirl.create(:account)
|
28
|
-
|
29
|
-
|
27
|
+
user = double
|
28
|
+
expect(Plaid::User).to receive(:load).with(:connect, "test_wells").and_return(user)
|
29
|
+
expect(user).to receive(:delete)
|
30
30
|
account.send(:delete_connect)
|
31
31
|
end
|
32
32
|
|
33
33
|
it "does not delete_connect" do
|
34
34
|
FactoryGirl.create(:account)
|
35
|
-
expect(Plaid::
|
36
|
-
{ access_token: 'test_wells'})
|
35
|
+
expect(Plaid::User).to_not receive(:load).with(:connect, "test_wells").and_raise("boom")
|
37
36
|
account.send(:delete_connect)
|
38
37
|
end
|
39
38
|
end
|
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
module PlaidRails
|
3
3
|
describe CreateAccountService do
|
4
4
|
|
5
|
-
let(:user){Plaid.
|
5
|
+
let(:user){Plaid::User.create(:connect, 'wells', 'plaid_test', 'plaid_good')}
|
6
6
|
|
7
7
|
let(:account_params){{
|
8
8
|
"account_ids"=> user.accounts.map{|a| a.id},
|
data/spec/spec_helper.rb
CHANGED
@@ -9,9 +9,9 @@ require 'webmock/rspec'
|
|
9
9
|
|
10
10
|
WebMock.allow_net_connect!
|
11
11
|
Plaid.config do |p|
|
12
|
-
p.
|
12
|
+
p.client_id = 'test_id'
|
13
13
|
p.secret = 'test_secret'
|
14
|
-
p.
|
14
|
+
p.env = :tartan
|
15
15
|
end
|
16
16
|
Rails.backtrace_cleaner.remove_silencers!
|
17
17
|
# Load support files
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plaid_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Curt Wilhelm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: plaid
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: sqlite3
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|