finapps 5.0.3 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.rubocop.yml +1 -7
  4. data/.tmuxinator.yml +19 -0
  5. data/Guardfile +42 -0
  6. data/finapps.gemspec +3 -1
  7. data/lib/finapps.rb +1 -7
  8. data/lib/finapps/rest/client.rb +5 -10
  9. data/lib/finapps/rest/consumers.rb +2 -1
  10. data/lib/finapps/rest/operators.rb +8 -2
  11. data/lib/finapps/rest/order_reports.rb +2 -1
  12. data/lib/finapps/rest/orders.rb +11 -9
  13. data/lib/finapps/rest/plaid/plaid_consumer_institutions.rb +15 -0
  14. data/lib/finapps/rest/portfolios_alerts.rb +2 -1
  15. data/lib/finapps/rest/portfolios_available_consumers.rb +2 -1
  16. data/lib/finapps/rest/portfolios_consumers.rb +6 -1
  17. data/lib/finapps/rest/products.rb +1 -2
  18. data/lib/finapps/rest/sessions.rb +8 -2
  19. data/lib/finapps/rest/statements.rb +2 -1
  20. data/lib/finapps/version.rb +1 -1
  21. data/spec/rest/alert_definitions_spec.rb +12 -7
  22. data/spec/rest/alert_occurrences_spec.rb +17 -5
  23. data/spec/rest/client_spec.rb +115 -57
  24. data/spec/rest/consumers_portfolios_spec.rb +9 -4
  25. data/spec/rest/consumers_spec.rb +76 -20
  26. data/spec/rest/operators_password_resets_spec.rb +19 -10
  27. data/spec/rest/operators_spec.rb +60 -22
  28. data/spec/rest/order_assignments_spec.rb +11 -5
  29. data/spec/rest/order_notifications_spec.rb +6 -2
  30. data/spec/rest/order_refreshes_spec.rb +11 -5
  31. data/spec/rest/order_reports_spec.rb +15 -5
  32. data/spec/rest/order_statuses_spec.rb +12 -4
  33. data/spec/rest/order_tokens_spec.rb +17 -5
  34. data/spec/rest/orders_spec.rb +80 -34
  35. data/spec/rest/password_resets_spec.rb +51 -14
  36. data/spec/rest/plaid/plaid_webhooks_spec.rb +7 -3
  37. data/spec/rest/portfolio_reports_spec.rb +9 -4
  38. data/spec/rest/portfolios_alerts_spec.rb +18 -10
  39. data/spec/rest/portfolios_available_consumers_spec.rb +9 -4
  40. data/spec/rest/portfolios_consumers_spec.rb +29 -11
  41. data/spec/rest/portfolios_spec.rb +51 -22
  42. data/spec/rest/products_spec.rb +5 -2
  43. data/spec/rest/sessions_spec.rb +36 -14
  44. data/spec/rest/statements_spec.rb +6 -2
  45. data/spec/rest/tenant_app_settings_spec.rb +13 -5
  46. data/spec/rest/tenant_settings_spec.rb +13 -5
  47. data/spec/rest/version_spec.rb +3 -1
  48. data/spec/spec_helper.rb +6 -4
  49. data/spec/spec_helpers/client.rb +2 -1
  50. data/spec/support/fake_api.rb +253 -119
  51. data/spec/utils/query_builder_spec.rb +8 -3
  52. data/tags +6 -0
  53. metadata +48 -25
  54. data/lib/finapps/rest/consumer_institution_refresh.rb +0 -14
  55. data/lib/finapps/rest/consumer_institution_refreshes.rb +0 -12
  56. data/lib/finapps/rest/institutions.rb +0 -34
  57. data/lib/finapps/rest/institutions_forms.rb +0 -14
  58. data/lib/finapps/rest/user_institutions.rb +0 -54
  59. data/lib/finapps/rest/user_institutions_forms.rb +0 -14
  60. data/lib/finapps/rest/user_institutions_statuses.rb +0 -19
  61. data/spec/rest/consumer_institution_refresh_spec.rb +0 -44
  62. data/spec/rest/consumer_institution_refreshes_spec.rb +0 -20
  63. data/spec/rest/institutions_forms_spec.rb +0 -29
  64. data/spec/rest/institutions_spec.rb +0 -55
  65. data/spec/rest/user_institutions_forms_spec.rb +0 -30
  66. data/spec/rest/user_institutions_spec.rb +0 -144
  67. data/spec/rest/user_institutions_statuses_spec.rb +0 -43
@@ -24,7 +24,9 @@ RSpec.describe FinApps::REST::PortfoliosAvailableConsumers do
24
24
 
25
25
  it { expect { list }.not_to raise_error }
26
26
  it('returns an array') { expect(list).to be_a(Array) }
27
- it('performs a get and returns the response') { expect(results).to respond_to(:records) }
27
+ it('performs a get and returns the response') do
28
+ expect(results).to have_key(:records)
29
+ end
28
30
  it('returns no error messages') { expect(errors).to be_empty }
29
31
  end
30
32
 
@@ -41,12 +43,15 @@ RSpec.describe FinApps::REST::PortfoliosAvailableConsumers do
41
43
 
42
44
  it { expect { list }.not_to raise_error }
43
45
  it('returns an array') { expect(list).to be_a(Array) }
44
- it('performs a get and returns the response') { expect(results).to respond_to(:records) }
46
+ it('performs a get and returns the response') do
47
+ expect(results).to have_key(:records)
48
+ end
45
49
  it('returns no error messages') { expect(errors).to be_empty }
46
50
  it 'builds query and sends proper request' do
47
51
  list
48
- url = "#{versioned_api_path}/portfolios/#{id}/consumers/available?page=2&" \
49
- 'requested=25&sort=-created_date'
52
+ url =
53
+ "#{versioned_api_path}/portfolios/#{id}/consumers/available?page=2&" \
54
+ 'requested=25&sort=-created_date'
50
55
  expect(WebMock).to have_requested(:get, url)
51
56
  end
52
57
  end
@@ -31,7 +31,9 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
31
31
 
32
32
  it { expect { list }.not_to raise_error }
33
33
  it('returns an array') { expect(list).to be_a(Array) }
34
- it('performs a get and returns the response') { expect(results).to respond_to(:records) }
34
+ it('performs a get and returns the response') do
35
+ expect(results).to have_key(:records)
36
+ end
35
37
  it('returns no error messages') { expect(errors).to be_empty }
36
38
  end
37
39
 
@@ -41,12 +43,15 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
41
43
 
42
44
  it { expect { list }.not_to raise_error }
43
45
  it('returns an array') { expect(list).to be_a(Array) }
44
- it('performs a get and returns the response') { expect(results).to respond_to(:records) }
46
+ it('performs a get and returns the response') do
47
+ expect(results).to have_key(:records)
48
+ end
45
49
  it('returns no error messages') { expect(errors).to be_empty }
46
50
  it 'builds query and sends proper request' do
47
51
  list
48
- url = "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers?page=2&" \
49
- 'requested=25&sort=-created_date'
52
+ url =
53
+ "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers?page=2&" \
54
+ 'requested=25&sort=-created_date'
50
55
  expect(WebMock).to have_requested(:get, url)
51
56
  end
52
57
  end
@@ -72,14 +77,18 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
72
77
  let(:portfolio_id) { nil }
73
78
  let(:params) { 'valid_id' }
74
79
 
75
- it { expect { create }.to raise_error(FinAppsCore::MissingArgumentsError) }
80
+ it do
81
+ expect { create }.to raise_error(FinAppsCore::MissingArgumentsError)
82
+ end
76
83
  end
77
84
 
78
85
  context 'when missing params' do
79
86
  let(:portfolio_id) { 'valid_id' }
80
87
  let(:params) { nil }
81
88
 
82
- it { expect { create }.to raise_error(FinAppsCore::MissingArgumentsError) }
89
+ it do
90
+ expect { create }.to raise_error(FinAppsCore::MissingArgumentsError)
91
+ end
83
92
  end
84
93
 
85
94
  context 'for bulk subscribe' do
@@ -106,7 +115,9 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
106
115
  it('results is nil') { expect(results).to be_nil }
107
116
  it('error messages array is populated') do
108
117
  # this will break when client is fixed to expect new array error response
109
- expect(errors.first.downcase).to eq('the server responded with status 400')
118
+ expect(errors.first.downcase).to eq(
119
+ 'the server responded with status 400'
120
+ )
110
121
  end
111
122
  end
112
123
  end
@@ -122,7 +133,8 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
122
133
  it('returns no error messages') { expect(errors).to be_empty }
123
134
  it('builds correct url') do
124
135
  create
125
- url = "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers/#{params}"
136
+ url =
137
+ "#{versioned_api_path}/portfolios/#{portfolio_id}/consumers/#{params}"
126
138
  expect(WebMock).to have_requested(:post, url)
127
139
  end
128
140
  end
@@ -134,7 +146,9 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
134
146
  it { expect { create }.not_to raise_error }
135
147
  it('results is nil') { expect(results).to be_nil }
136
148
  it('error messages array is populated') do
137
- expect(errors.first.downcase).to eq('consumer not eligible, no completed orders.')
149
+ expect(errors.first.downcase).to eq(
150
+ 'consumer not eligible, no completed orders.'
151
+ )
138
152
  end
139
153
  end
140
154
  end
@@ -149,14 +163,18 @@ RSpec.describe FinApps::REST::PortfoliosConsumers do
149
163
  let(:portfolio_id) { nil }
150
164
  let(:consumer_id) { 'valid_id' }
151
165
 
152
- it { expect { destroy }.to raise_error(FinAppsCore::MissingArgumentsError) }
166
+ it do
167
+ expect { destroy }.to raise_error(FinAppsCore::MissingArgumentsError)
168
+ end
153
169
  end
154
170
 
155
171
  context 'when missing consumer_id' do
156
172
  let(:portfolio_id) { 'valid_id' }
157
173
  let(:consumer_id) { nil }
158
174
 
159
- it { expect { destroy }.to raise_error(FinAppsCore::MissingArgumentsError) }
175
+ it do
176
+ expect { destroy }.to raise_error(FinAppsCore::MissingArgumentsError)
177
+ end
160
178
  end
161
179
 
162
180
  context 'when valid ids are provided' do
@@ -16,7 +16,9 @@ RSpec.describe FinApps::REST::Portfolios do
16
16
 
17
17
  it { expect { list }.not_to raise_error }
18
18
  it('returns an array') { expect(list).to be_a(Array) }
19
- it('performs a get and returns the response') { expect(results).to respond_to(:records) }
19
+ it('performs a get and returns the response') do
20
+ expect(results).to have_key(:records)
21
+ end
20
22
  it('returns no error messages') { expect(errors).to be_empty }
21
23
  end
22
24
 
@@ -31,11 +33,14 @@ RSpec.describe FinApps::REST::Portfolios do
31
33
 
32
34
  it { expect { list }.not_to raise_error }
33
35
  it('returns an array') { expect(list).to be_a(Array) }
34
- it('performs a get and returns the response') { expect(results).to respond_to(:records) }
36
+ it('performs a get and returns the response') do
37
+ expect(results).to have_key(:records)
38
+ end
35
39
  it('returns no error messages') { expect(errors).to be_empty }
36
40
  it 'builds query and sends proper request' do
37
41
  list
38
- url = "#{versioned_api_path}/portfolios?page=2&requested=25&sort=-created_date"
42
+ url =
43
+ "#{versioned_api_path}/portfolios?page=2&requested=25&sort=-created_date"
39
44
  expect(WebMock).to have_requested(:get, url)
40
45
  end
41
46
  end
@@ -55,11 +60,11 @@ RSpec.describe FinApps::REST::Portfolios do
55
60
  context 'when valid id is provided' do
56
61
  let(:id) { 'valid_id' }
57
62
 
58
- it { expect { show }.not_to raise_error(FinAppsCore::MissingArgumentsError) }
63
+ it { expect { show }.not_to raise_error }
59
64
  it('returns an array') { expect(show).to be_a(Array) }
60
65
  it('performs a get and returns the response') do
61
- expect(results).to respond_to(:_id)
62
- expect(results).to respond_to(:product)
66
+ expect(results).to have_key(:_id)
67
+ expect(results).to have_key(:product)
63
68
  end
64
69
  it('returns no error messages') { expect(errors).to be_empty }
65
70
  end
@@ -83,25 +88,39 @@ RSpec.describe FinApps::REST::Portfolios do
83
88
  context 'when missing params' do
84
89
  let(:params) { nil }
85
90
 
86
- it { expect { create }.to raise_error(FinAppsCore::MissingArgumentsError) }
91
+ it do
92
+ expect { create }.to raise_error(FinAppsCore::MissingArgumentsError)
93
+ end
87
94
  end
88
95
 
89
96
  context 'when valid params are provided' do
90
- let(:params) { { name: 'Account Checks', description: 'Some Check Stuff', product: 'valid' } }
97
+ let(:params) do
98
+ {
99
+ name: 'Account Checks',
100
+ description: 'Some Check Stuff',
101
+ product: 'valid'
102
+ }
103
+ end
91
104
 
92
- it { expect { create }.not_to raise_error(FinAppsCore::MissingArgumentsError) }
105
+ it { expect { create }.not_to raise_error }
93
106
  it('returns an array') { expect(create).to be_a(Array) }
94
107
  it('performs a get and returns the response') do
95
- expect(results).to respond_to(:_id)
96
- expect(results).to respond_to(:product)
108
+ expect(results).to have_key(:_id)
109
+ expect(results).to have_key(:product)
97
110
  end
98
111
  it('returns no error messages') { expect(errors).to be_empty }
99
112
  end
100
113
 
101
114
  context 'when invalid params are provided' do
102
- let(:params) { { name: 'Account Checks', description: 'Some Check Stuff', product: 'invalid' } }
115
+ let(:params) do
116
+ {
117
+ name: 'Account Checks',
118
+ description: 'Some Check Stuff',
119
+ product: 'invalid'
120
+ }
121
+ end
103
122
 
104
- it { expect { create }.not_to raise_error(FinAppsCore::MissingArgumentsError) }
123
+ it { expect { create }.not_to raise_error }
105
124
  it('results is nil') { expect(results).to be_nil }
106
125
  it('error messages array is populated') do
107
126
  expect(errors.first.downcase).to eq('invalid request body')
@@ -118,34 +137,40 @@ RSpec.describe FinApps::REST::Portfolios do
118
137
  let(:id) { nil }
119
138
  let(:params) { { fake: 'data' } }
120
139
 
121
- it { expect { update }.to raise_error(FinAppsCore::MissingArgumentsError) }
140
+ it do
141
+ expect { update }.to raise_error(FinAppsCore::MissingArgumentsError)
142
+ end
122
143
  end
123
144
 
124
145
  context 'when missing params' do
125
146
  let(:id) { 'valid_id' }
126
147
  let(:params) { nil }
127
148
 
128
- it { expect { update }.to raise_error(FinAppsCore::MissingArgumentsError) }
149
+ it do
150
+ expect { update }.to raise_error(FinAppsCore::MissingArgumentsError)
151
+ end
129
152
  end
130
153
 
131
154
  context 'when invalid id or params are provided' do
132
155
  let(:id) { 'invalid_id' }
133
156
  let(:params) { { fake: 'data' } }
134
157
 
135
- it { expect { update }.not_to raise_error(FinAppsCore::MissingArgumentsError) }
158
+ it { expect { update }.not_to raise_error }
136
159
  it('results is nil') { expect(results).to be_nil }
137
- it('error messages array is populated') { expect(errors.first.downcase).to eq('resource not found') }
160
+ it('error messages array is populated') do
161
+ expect(errors.first.downcase).to eq('resource not found')
162
+ end
138
163
  end
139
164
 
140
165
  context 'when valid id and params are provided' do
141
166
  let(:id) { 'valid_id' }
142
167
  let(:params) { { fake: 'data' } }
143
168
 
144
- it { expect { update }.not_to raise_error(FinAppsCore::MissingArgumentsError) }
169
+ it { expect { update }.not_to raise_error }
145
170
  it('returns an array') { expect(update).to be_a(Array) }
146
171
  it('performs a get and returns the response') do
147
- expect(results).to respond_to(:_id)
148
- expect(results).to respond_to(:product)
172
+ expect(results).to have_key(:_id)
173
+ expect(results).to have_key(:product)
149
174
  end
150
175
  it('returns no error messages') { expect(errors).to be_empty }
151
176
  end
@@ -159,7 +184,9 @@ RSpec.describe FinApps::REST::Portfolios do
159
184
  context 'when missing id' do
160
185
  let(:id) { nil }
161
186
 
162
- it { expect { destroy }.to raise_error(FinAppsCore::MissingArgumentsError) }
187
+ it do
188
+ expect { destroy }.to raise_error(FinAppsCore::MissingArgumentsError)
189
+ end
163
190
  end
164
191
 
165
192
  context 'when invalid id is provided' do
@@ -167,7 +194,9 @@ RSpec.describe FinApps::REST::Portfolios do
167
194
 
168
195
  it { expect { destroy }.not_to raise_error }
169
196
  it('results is nil') { expect(results).to be_nil }
170
- it('error messages array is populated') { expect(errors.first.downcase).to eq('resource not found') }
197
+ it('error messages array is populated') do
198
+ expect(errors.first.downcase).to eq('resource not found')
199
+ end
171
200
  end
172
201
 
173
202
  context 'when valid id is provided' do
@@ -2,7 +2,8 @@
2
2
 
3
3
  require 'spec_helpers/client'
4
4
 
5
- RSpec.describe FinApps::REST::Products, 'initialized with valid FinApps::Client object' do
5
+ RSpec.describe FinApps::REST::Products,
6
+ 'initialized with valid FinApps::Client object' do
6
7
  include SpecHelpers::Client
7
8
  subject(:products) { FinApps::REST::Products.new(client) }
8
9
 
@@ -14,7 +15,9 @@ RSpec.describe FinApps::REST::Products, 'initialized with valid FinApps::Client
14
15
 
15
16
  it { expect { list }.not_to raise_error }
16
17
  it('returns an array of records') { expect(results).to be_a(Array) }
17
- it('performs a get and returns the response') { expect(results[0]).to respond_to(:code) }
18
+ it('performs a get and returns the response') do
19
+ expect(results[0]).to have_key(:code)
20
+ end
18
21
  it('returns no error messages') { expect(error_messages).to be_empty }
19
22
  end
20
23
  end
@@ -2,7 +2,8 @@
2
2
 
3
3
  require 'spec_helpers/client'
4
4
 
5
- RSpec.describe FinApps::REST::Sessions, 'initialized with valid FinApps::Client object' do
5
+ RSpec.describe FinApps::REST::Sessions,
6
+ 'initialized with valid FinApps::Client object' do
6
7
  include SpecHelpers::Client
7
8
  subject { FinApps::REST::Sessions.new(client) }
8
9
 
@@ -14,39 +15,60 @@ RSpec.describe FinApps::REST::Sessions, 'initialized with valid FinApps::Client
14
15
  context 'when missing email or password' do
15
16
  message = 'Invalid argument: params.'
16
17
  it do
17
- expect { subject.create(email: nil, password: 'password') }
18
- .to raise_error(FinAppsCore::InvalidArgumentsError, message)
18
+ expect do
19
+ subject.create(email: nil, password: 'password')
20
+ end.to raise_error(FinAppsCore::InvalidArgumentsError, message)
19
21
  end
20
22
  it do
21
- expect { subject.create(email: 'email', password: nil) }
22
- .to raise_error(FinAppsCore::InvalidArgumentsError, message)
23
+ expect { subject.create(email: 'email', password: nil) }.to raise_error(
24
+ FinAppsCore::InvalidArgumentsError,
25
+ message
26
+ )
23
27
  end
24
28
  end
25
29
 
26
30
  context 'for invalid credentials' do
27
- let(:credentials) { { email: 'email@domain.com', password: 'invalid_password' } }
31
+ let(:credentials) do
32
+ { email: 'email@domain.com', password: 'invalid_password' }
33
+ end
28
34
 
29
35
  it { expect { create }.not_to raise_error }
30
36
  it('results is nil') { expect(results).to be_nil }
31
37
  error_message = 'Invalid Consumer Identifier or Credentials'
32
- it('error_messages are populated') { expect(error_messages.first).to eq(error_message) }
38
+ it('error_messages are populated') do
39
+ expect(error_messages.first).to eq(error_message)
40
+ end
33
41
  end
34
42
 
35
43
  context 'for valid credentials' do
36
- let(:credentials) { { email: 'email@domain.com', password: 'valid_password' } }
44
+ let(:credentials) do
45
+ { email: 'email@domain.com', password: 'valid_password' }
46
+ end
37
47
 
38
- it('results is a Hashie::Rash') { expect(results).to be_a(Hashie::Mash::Rash) }
39
- it('token value is in the result') { expect(results).to respond_to(:token) }
48
+ it('results is a Hashie::Rash') do
49
+ expect(results).to be_a(Hash)
50
+ end
51
+ it('token value is in the result') do
52
+ expect(results).to have_key(:token)
53
+ end
40
54
  it('error_messages is empty') { expect(error_messages).to be_empty }
41
55
  end
42
56
 
43
57
  context 'for valid credentials & path argument' do
44
58
  let(:create) { subject.create(credentials, 'operators/login') }
45
- let(:credentials) { { email: 'email@domain.com', password: 'valid_password' } }
59
+ let(:credentials) do
60
+ { email: 'email@domain.com', password: 'valid_password' }
61
+ end
46
62
 
47
- it('results is a Hashie::Rash') { expect(results).to be_a(Hashie::Mash::Rash) }
48
- it('token value is in the result') { expect(results).to respond_to(:token) }
49
- it('returns operator for operator path') { expect(results).to respond_to(:role) }
63
+ it('results is a Hashie::Rash') do
64
+ expect(results).to be_a(Hash)
65
+ end
66
+ it('token value is in the result') do
67
+ expect(results).to have_key(:token)
68
+ end
69
+ it('returns operator for operator path') do
70
+ expect(results).to have_key(:role)
71
+ end
50
72
  it('error_messages is empty') { expect(error_messages).to be_empty }
51
73
  end
52
74
  end
@@ -21,8 +21,12 @@ RSpec.describe FinApps::REST::Statements do
21
21
  let(:show) { subject.show('valid_id', 'valid_id') }
22
22
  it { expect { show }.not_to raise_error }
23
23
  it('returns an array') { expect(show).to be_a(Array) }
24
- it('performs a get and returns the response') { expect(show[RESULTS]).to respond_to(:data) }
25
- it('returns no error messages') { expect(show[ERROR_MESSAGES]).to be_empty }
24
+ it('performs a get and returns the response') do
25
+ expect(show[RESULTS]).to have_key(:data)
26
+ end
27
+ it('returns no error messages') do
28
+ expect(show[ERROR_MESSAGES]).to be_empty
29
+ end
26
30
  end
27
31
 
28
32
  context 'when invalid ids are provided' do
@@ -11,7 +11,7 @@ RSpec.describe FinApps::REST::TenantAppSettings do
11
11
 
12
12
  it { expect { show }.not_to raise_error }
13
13
  it('performs a get and returns the response') do
14
- expect(show[RESULTS]).to respond_to(:pdf_statement_months)
14
+ expect(show[RESULTS]).to have_key(:pdf_statement_months)
15
15
  end
16
16
  it('returns no error messages') { expect(show[ERROR_MESSAGES]).to be_empty }
17
17
  end
@@ -21,15 +21,21 @@ RSpec.describe FinApps::REST::TenantAppSettings do
21
21
 
22
22
  context 'when missing params' do
23
23
  let(:params) { nil }
24
- it { expect { update }.to raise_error(FinAppsCore::MissingArgumentsError) }
24
+ it do
25
+ expect { update }.to raise_error(FinAppsCore::MissingArgumentsError)
26
+ end
25
27
  end
26
28
 
27
29
  context 'when valid params are provided' do
28
30
  let(:params) { { pdf_statement_months: 2 } }
29
31
 
30
32
  it { expect { update }.not_to raise_error }
31
- it('performs put and returns no content') { expect(update[RESULTS]).to be_nil }
32
- it('error_messages array is empty') { expect(update[ERROR_MESSAGES]).to be_empty }
33
+ it('performs put and returns no content') do
34
+ expect(update[RESULTS]).to be_nil
35
+ end
36
+ it('error_messages array is empty') do
37
+ expect(update[ERROR_MESSAGES]).to be_empty
38
+ end
33
39
  end
34
40
 
35
41
  context 'when invalid params are provided' do
@@ -37,7 +43,9 @@ RSpec.describe FinApps::REST::TenantAppSettings do
37
43
 
38
44
  it { expect { update }.not_to raise_error }
39
45
  it('results is nil') { expect(update[RESULTS]).to be_nil }
40
- it('error_messages array is populated') { expect(update[ERROR_MESSAGES]).not_to be_empty }
46
+ it('error_messages array is populated') do
47
+ expect(update[ERROR_MESSAGES]).not_to be_empty
48
+ end
41
49
  end
42
50
  end
43
51
  end