finapps 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7cc8f3182020dea8fb734048141cf00d287e70d107e71006671b88ed2f81d9fa
4
- data.tar.gz: 8d21a3acc5bb62ce331672b0bceff88d46096d49d3200d9e9e0129fece5a192e
3
+ metadata.gz: '095e2b6352f9f63b6ad47ff7dc24a5a57badbe81c07395b248cc8d2106b95e2e'
4
+ data.tar.gz: 75df3521c3058b8e5693a506b7cd7da232b434e38299aae0a34bc91361f6373a
5
5
  SHA512:
6
- metadata.gz: 53ec19d9a43dccfa1b3ba605b4216a5001ab26e1c30bf1dbf318120e1648ea83486a467d94fbf87b4563c359bc194c2ca95bd531bb5086d141238b515d84c9ba
7
- data.tar.gz: f30df20bf25322843b993c1a5bbf484e5d3eff0d9cd0b663bde45e013241279610c07a2d49abc3d2029a0d1a5a34b2dd87ae360ab55c8bf20e82c135048c23ca
6
+ metadata.gz: 471c9ab99b5048b6ccf6fe069b447182e2480b4d4d41923720576ddb580cce693fa9f71f115594aa8d6bc6ade620d0de4b6c2994f6b8851cfbf424b73c368d0c
7
+ data.tar.gz: 16fa7ed1754577cb389a5cfad5c511d35ae3b764a57292313a30fb38198e6ab341a6f5fc91c87b44a6c89246938406abfc302734d546da0fac5dd87a219ac0e4
data/.gitignore CHANGED
@@ -28,3 +28,6 @@ mkmf.log
28
28
  .idea/
29
29
  /spec/tmp/*
30
30
  /Gemfile.lock
31
+
32
+ # vim swap files
33
+ *.swp
data/.rubocop.yml CHANGED
@@ -13,12 +13,6 @@ Metrics/LineLength:
13
13
  Style/AccessModifierDeclarations:
14
14
  Enabled: false
15
15
 
16
- Layout/SpaceInsideBlockBraces:
17
- # The space here provides no real gain in readability while consuming
18
- # horizontal space that could be used for a better parameter name.
19
- # Also {| differentiates better from a hash than { | does.
20
- SpaceBeforeBlockParameters: false
21
-
22
16
  Style/CollectionMethods:
23
17
  Description: Preferred collection methods.
24
18
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
@@ -98,4 +92,4 @@ Style/VariableInterpolation:
98
92
  Lint/HandleExceptions:
99
93
  Description: Don't suppress exception.
100
94
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
101
- Enabled: false
95
+ Enabled: false
data/.tmuxinator.yml ADDED
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: ruby-client
3
+ root: ~/projects/ruby-client/
4
+ windows:
5
+ -
6
+ editor:
7
+ layout: main-vertical
8
+ panes:
9
+ - vim: $EDITOR
10
+ - bash:
11
+ - git pull
12
+ - git status
13
+ - bundle
14
+ -
15
+ guard:
16
+ layout: even-horizontal
17
+ panes:
18
+ - guard:
19
+ - bundle exec guard
data/Guardfile ADDED
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+
20
+ # Note: The cmd option is now required due to the increasing number of ways
21
+ # rspec may be run, below are examples of the most common uses.
22
+ # * bundler: 'bundle exec rspec'
23
+ # * bundler binstubs: 'bin/rspec'
24
+ # * spring: 'bin/rspec' (This will use spring if running and you have
25
+ # installed the spring binstubs per the docs)
26
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
27
+ # * 'just' rspec: 'rspec'
28
+
29
+ guard :rspec, cmd: 'bundle exec rspec' do
30
+ require 'guard/rspec/dsl'
31
+ dsl = Guard::RSpec::Dsl.new(self)
32
+
33
+ # RSpec files
34
+ rspec = dsl.rspec
35
+ watch(rspec.spec_helper) { rspec.spec_dir }
36
+ watch(rspec.spec_support) { rspec.spec_dir }
37
+ watch(rspec.spec_files)
38
+
39
+ # Ruby files
40
+ ruby = dsl.ruby
41
+ dsl.watch_spec_files_for(ruby.lib_files)
42
+ end
data/finapps.gemspec CHANGED
@@ -20,11 +20,13 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = Dir['spec/**/*.rb']
21
21
  spec.require_paths = ['lib']
22
22
 
23
- spec.add_runtime_dependency 'finapps_core', '~> 5.0', '>= 5.0.0'
23
+ spec.add_runtime_dependency 'finapps_core', '~> 5.0', '>= 5.0.1'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 2.0', '>= 2.0.2'
26
26
  spec.add_development_dependency 'codeclimate-test-reporter', '~> 1.0', '>= 1.0.9'
27
27
  spec.add_development_dependency 'gem-release', '~> 2.0', '>= 2.0.3'
28
+ spec.add_development_dependency 'guard', '~> 2.15', '>= 2.15.0'
29
+ spec.add_development_dependency 'guard-rspec', '~> 4.7', '>= 4.7.3'
28
30
  spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.2'
29
31
  spec.add_development_dependency 'rspec', '~> 3.8', '>= 3.8.0'
30
32
  spec.add_development_dependency 'rubocop', '~> 0.73', '>= 0.73.0'
data/lib/finapps.rb CHANGED
@@ -6,16 +6,9 @@ require 'faraday_middleware'
6
6
  require 'finapps_core'
7
7
  require 'finapps/rest/version'
8
8
  require 'finapps/rest/consumers'
9
- require 'finapps/rest/consumer_institution_refreshes'
10
- require 'finapps/rest/consumer_institution_refresh'
11
9
  require 'finapps/rest/sessions'
12
10
  require 'finapps/rest/order_tokens'
13
11
  require 'finapps/rest/orders'
14
- require 'finapps/rest/institutions_forms'
15
- require 'finapps/rest/institutions'
16
- require 'finapps/rest/user_institutions_statuses'
17
- require 'finapps/rest/user_institutions'
18
- require 'finapps/rest/user_institutions_forms'
19
12
  require 'finapps/rest/order_reports'
20
13
  require 'finapps/rest/order_statuses'
21
14
  require 'finapps/rest/order_notifications'
@@ -37,6 +30,7 @@ require 'finapps/rest/portfolios_alerts'
37
30
  require 'finapps/rest/portfolios_consumers'
38
31
  require 'finapps/rest/consumers_portfolios'
39
32
  require 'finapps/rest/portfolio_reports'
33
+
40
34
  require 'finapps/rest/plaid/plaid_webhooks'
41
35
 
42
36
  require 'finapps/utils/query_builder'
@@ -10,8 +10,6 @@ module FinApps
10
10
  alert_definitions
11
11
  alert_occurrences
12
12
  consumers_portfolios
13
- institutions
14
- institutions_forms
15
13
  orders
16
14
  order_assignments
17
15
  order_notifications
@@ -29,15 +27,9 @@ module FinApps
29
27
  portfolios_consumers
30
28
  portfolio_reports
31
29
  sessions
32
- statements
33
30
  consumers
34
- consumer_institution_refreshes
35
- consumer_institution_refresh
36
31
  tenant_settings
37
32
  tenant_app_settings
38
- user_institutions
39
- user_institutions_forms
40
- user_institutions_statuses
41
33
  version
42
34
  plaid_webhooks
43
35
  ].freeze
@@ -57,7 +49,8 @@ module FinApps
57
49
  class_name = camelize(symbol.to_s)
58
50
  variable = "@#{class_name.downcase}"
59
51
  unless instance_variable_defined? variable
60
- klass = Object.const_get('FinApps').const_get('REST').const_get class_name
52
+ klass =
53
+ Object.const_get('FinApps').const_get('REST').const_get class_name
61
54
  instance_variable_set(variable, klass.new(self))
62
55
  end
63
56
  instance_variable_get(variable)
@@ -75,7 +68,9 @@ module FinApps
75
68
  def camelize(term)
76
69
  string = term.to_s
77
70
  string = string.sub(/^[a-z\d]*/) { $&.capitalize }
78
- string.gsub(%r{(?:_|(/))([a-z\d]*)}) { Regexp.last_match(2).capitalize.to_s }
71
+ string.gsub(%r{(?:_|(/))([a-z\d]*)}) do
72
+ Regexp.last_match(2).capitalize.to_s
73
+ end
79
74
  end
80
75
  end
81
76
  end
@@ -21,7 +21,8 @@ module FinApps
21
21
  not_blank(public_id, :public_id)
22
22
  not_blank(params, :params)
23
23
 
24
- path = "#{end_point}/#{ERB::Util.url_encode(public_id)}#{'/password' if password_update?(params)}"
24
+ path =
25
+ "#{end_point}/#{ERB::Util.url_encode(public_id)}#{'/password' if password_update?(params)}"
25
26
  super params, path
26
27
  end
27
28
 
@@ -51,7 +51,9 @@ module FinApps
51
51
  private
52
52
 
53
53
  def validates(params)
54
- params.key?(:password) && params[:password] && params.key?(:password_confirm) && params[:password_confirm]
54
+ params.key?(:password) && params[:password] &&
55
+ params.key?(:password_confirm) &&
56
+ params[:password_confirm]
55
57
  end
56
58
 
57
59
  def build_filter(params)
@@ -66,7 +68,11 @@ module FinApps
66
68
  end
67
69
 
68
70
  def role_query(role)
69
- role.is_a?(Array) ? { "role": { "$in": role.map(&:to_i) } } : { "role": role.to_i }
71
+ if role.is_a?(Array)
72
+ { "role": { "$in": role.map(&:to_i) } }
73
+ else
74
+ { "role": role.to_i }
75
+ end
70
76
  end
71
77
  end
72
78
  end
@@ -8,7 +8,8 @@ module FinApps
8
8
  not_blank(format, :format)
9
9
  raise FinAppsCore::InvalidArgumentsError, 'Invalid argument: format' unless accepted_format?(format)
10
10
 
11
- path = "orders/#{ERB::Util.url_encode(id)}/report.#{ERB::Util.url_encode(format)}"
11
+ path =
12
+ "orders/#{ERB::Util.url_encode(id)}/report.#{ERB::Util.url_encode(format)}"
12
13
  super nil, path
13
14
  end
14
15
 
@@ -68,22 +68,24 @@ module FinApps
68
68
  def search_query(term)
69
69
  {
70
70
  "$or": [
71
- { "public_id": {
72
- "$regex": "^#{term}",
73
- "$options": 'i'
74
- } },
71
+ { "public_id": { "$regex": "^#{term}", "$options": 'i' } },
75
72
  { "applicant.last_name": term },
76
73
  { "assignment.last_name": term },
77
- { "requestor.reference_no": {
78
- "$regex": "^#{term}",
79
- "$options": 'i'
80
- } }
74
+ {
75
+ "requestor.reference_no": {
76
+ "$regex": "^#{term}", "$options": 'i'
77
+ }
78
+ }
81
79
  ]
82
80
  }
83
81
  end
84
82
 
85
83
  def status_query(status)
86
- status.is_a?(Array) ? { "status": { "$in": status.map(&:to_i) } } : { "status": status.to_i }
84
+ if status.is_a?(Array)
85
+ { "status": { "$in": status.map(&:to_i) } }
86
+ else
87
+ { "status": status.to_i }
88
+ end
87
89
  end
88
90
 
89
91
  def assignment_query(assignment)
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinApps
4
+ module REST
5
+ class PlaidConsumerInstitutions < FinAppsCore::REST::Resources # :nodoc:
6
+ def create(params)
7
+ super(params, 'p/institution/consumer')
8
+ end
9
+
10
+ def list
11
+ super 'p/institution/consumer'
12
+ end
13
+ end
14
+ end
15
+ end
@@ -26,7 +26,8 @@ module FinApps
26
26
  private
27
27
 
28
28
  def build_path(portfolio_id, alert_id = nil)
29
- alert_path = alert_id ? "alerts/#{ERB::Util.url_encode(alert_id)}" : 'alerts'
29
+ alert_path =
30
+ alert_id ? "alerts/#{ERB::Util.url_encode(alert_id)}" : 'alerts'
30
31
  "portfolios/#{ERB::Util.url_encode(portfolio_id)}/" + alert_path
31
32
  end
32
33
  end
@@ -8,7 +8,8 @@ module FinApps
8
8
  def list(portfolio_id, params = nil)
9
9
  not_blank(portfolio_id, :portfolio_id)
10
10
 
11
- path = "portfolios/#{ERB::Util.url_encode(portfolio_id)}/consumers/available"
11
+ path =
12
+ "portfolios/#{ERB::Util.url_encode(portfolio_id)}/consumers/available"
12
13
  return super path if params.nil?
13
14
 
14
15
  raise FinAppsCore::InvalidArgumentsError, 'Invalid argument: params' unless params.is_a? Hash
@@ -37,7 +37,12 @@ module FinApps
37
37
  private
38
38
 
39
39
  def build_path(portfolio_id, consumer_id = nil)
40
- consumer_path = consumer_id ? "consumers/#{ERB::Util.url_encode(consumer_id)}" : 'consumers'
40
+ consumer_path =
41
+ if consumer_id
42
+ "consumers/#{ERB::Util.url_encode(consumer_id)}"
43
+ else
44
+ 'consumers'
45
+ end
41
46
  "portfolios/#{ERB::Util.url_encode(portfolio_id)}/" + consumer_path
42
47
  end
43
48
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  module FinApps
4
4
  module REST
5
- class Products < FinAppsCore::REST::Resources
6
- end
5
+ class Products < FinAppsCore::REST::Resources; end
7
6
  end
8
7
  end
@@ -15,7 +15,12 @@ module FinApps
15
15
  begin
16
16
  super params, path
17
17
  rescue FinAppsCore::ApiUnauthenticatedError
18
- return [nil, ["Invalid #{path == CONSUMER_LOGIN ? 'Consumer' : 'Operator'} Identifier or Credentials"]]
18
+ return [
19
+ nil,
20
+ [
21
+ "Invalid #{path == CONSUMER_LOGIN ? 'Consumer' : 'Operator'} Identifier or Credentials"
22
+ ]
23
+ ]
19
24
  end
20
25
  end
21
26
 
@@ -26,7 +31,8 @@ module FinApps
26
31
  private
27
32
 
28
33
  def validates(params)
29
- params.key?(:email) && params[:email] && params.key?(:password) && params[:password]
34
+ params.key?(:email) && params[:email] && params.key?(:password) &&
35
+ params[:password]
30
36
  end
31
37
  end
32
38
  end
@@ -7,7 +7,8 @@ module FinApps
7
7
  not_blank(account_id, :account_id)
8
8
  not_blank(document_id, :document_id)
9
9
 
10
- path = "accounts/#{ERB::Util.url_encode(account_id)}/statement/#{ERB::Util.url_encode(document_id)}"
10
+ path =
11
+ "accounts/#{ERB::Util.url_encode(account_id)}/statement/#{ERB::Util.url_encode(document_id)}"
11
12
  super nil, path
12
13
  end
13
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinApps
4
- VERSION = '5.0.3'
4
+ VERSION = '5.0.4'
5
5
  end
@@ -16,7 +16,9 @@ RSpec.describe FinApps::REST::AlertDefinitions 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,12 +33,15 @@ RSpec.describe FinApps::REST::AlertDefinitions 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}/portfolio/alerts/definitions?page=2&requested=25&" \
39
- 'sort=-created_date'
42
+ url =
43
+ "#{versioned_api_path}/portfolio/alerts/definitions?page=2&requested=25&" \
44
+ 'sort=-created_date'
40
45
  expect(WebMock).to have_requested(:get, url)
41
46
  end
42
47
  end
@@ -56,11 +61,11 @@ RSpec.describe FinApps::REST::AlertDefinitions do
56
61
  context 'when valid id is provided' do
57
62
  let(:id) { 'valid_id' }
58
63
 
59
- it { expect { show }.not_to raise_error(FinAppsCore::MissingArgumentsError) }
64
+ it { expect { show }.not_to raise_error }
60
65
  it('returns an array') { expect(show).to be_a(Array) }
61
66
  it('performs a get and returns the response') do
62
- expect(results).to respond_to(:_id)
63
- expect(results).to respond_to(:rule_name)
67
+ expect(results).to have_key(:_id)
68
+ expect(results).to have_key(:rule_name)
64
69
  end
65
70
  it('returns no error messages') { expect(errors).to be_empty }
66
71
  end
@@ -16,7 +16,9 @@ RSpec.describe FinApps::REST::AlertOccurrences 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
 
@@ -27,16 +29,26 @@ RSpec.describe FinApps::REST::AlertOccurrences do
27
29
  end
28
30
 
29
31
  context 'when including valid params' do
30
- let(:params) { { page: 2, sort: '-created_date', requested: 25, portfolio_id: 'valid_id' } }
32
+ let(:params) do
33
+ {
34
+ page: 2,
35
+ sort: '-created_date',
36
+ requested: 25,
37
+ portfolio_id: 'valid_id'
38
+ }
39
+ end
31
40
 
32
41
  it { expect { list }.not_to raise_error }
33
42
  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) }
43
+ it('performs a get and returns the response') do
44
+ expect(results).to have_key(:records)
45
+ end
35
46
  it('returns no error messages') { expect(errors).to be_empty }
36
47
  it 'builds query and sends proper request' do
37
48
  list
38
- url = "#{versioned_api_path}/portfolio/alerts/occurrences?" \
39
- 'filter=%7B%22portfolio_id%22:%22valid_id%22%7D&page=2&requested=25&sort=-created_date'
49
+ url =
50
+ "#{versioned_api_path}/portfolio/alerts/occurrences?" \
51
+ 'filter=%7B%22portfolio_id%22:%22valid_id%22%7D&page=2&requested=25&sort=-created_date'
40
52
  expect(WebMock).to have_requested(:get, url)
41
53
  end
42
54
  end