gocardless_pro 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +12 -0
  3. data/README.md +71 -28
  4. data/gocardless_pro.gemspec +1 -1
  5. data/lib/gocardless_pro/api_service.rb +4 -2
  6. data/lib/gocardless_pro/client.rb +2 -1
  7. data/lib/gocardless_pro/error.rb +12 -1
  8. data/lib/gocardless_pro/resources/mandate.rb +3 -0
  9. data/lib/gocardless_pro/resources/payout.rb +3 -0
  10. data/lib/gocardless_pro/resources/redirect_flow.rb +15 -14
  11. data/lib/gocardless_pro/services/bank_details_lookups_service.rb +10 -0
  12. data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +5 -2
  13. data/lib/gocardless_pro/services/creditors_service.rb +5 -2
  14. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +7 -3
  15. data/lib/gocardless_pro/services/customers_service.rb +5 -2
  16. data/lib/gocardless_pro/services/events_service.rb +2 -1
  17. data/lib/gocardless_pro/services/mandate_pdfs_service.rb +2 -1
  18. data/lib/gocardless_pro/services/mandates_service.rb +10 -5
  19. data/lib/gocardless_pro/services/payments_service.rb +11 -6
  20. data/lib/gocardless_pro/services/payouts_service.rb +2 -1
  21. data/lib/gocardless_pro/services/redirect_flows_service.rb +6 -3
  22. data/lib/gocardless_pro/services/refunds_service.rb +5 -2
  23. data/lib/gocardless_pro/services/subscriptions_service.rb +7 -3
  24. data/lib/gocardless_pro/version.rb +1 -1
  25. data/spec/api_response_spec.rb +4 -4
  26. data/spec/api_service_spec.rb +41 -43
  27. data/spec/client_spec.rb +2 -2
  28. data/spec/error_spec.rb +27 -18
  29. data/spec/resources/bank_details_lookup_spec.rb +19 -34
  30. data/spec/resources/creditor_bank_account_spec.rb +54 -99
  31. data/spec/resources/creditor_spec.rb +66 -115
  32. data/spec/resources/customer_bank_account_spec.rb +54 -99
  33. data/spec/resources/customer_spec.rb +71 -138
  34. data/spec/resources/event_spec.rb +74 -107
  35. data/spec/resources/mandate_pdf_spec.rb +15 -26
  36. data/spec/resources/mandate_spec.rb +54 -87
  37. data/spec/resources/payment_spec.rb +70 -119
  38. data/spec/resources/payout_spec.rb +50 -79
  39. data/spec/resources/redirect_flow_spec.rb +58 -95
  40. data/spec/resources/refund_spec.rb +42 -75
  41. data/spec/resources/subscription_spec.rb +82 -155
  42. data/spec/response_spec.rb +45 -46
  43. data/spec/services/bank_details_lookups_service_spec.rb +55 -60
  44. data/spec/services/creditor_bank_accounts_service_spec.rb +303 -347
  45. data/spec/services/creditors_service_spec.rb +290 -333
  46. data/spec/services/customer_bank_accounts_service_spec.rb +332 -380
  47. data/spec/services/customers_service_spec.rb +347 -400
  48. data/spec/services/events_service_spec.rb +154 -184
  49. data/spec/services/mandate_pdfs_service_spec.rb +52 -57
  50. data/spec/services/mandates_service_spec.rb +374 -410
  51. data/spec/services/payments_service_spec.rb +404 -461
  52. data/spec/services/payouts_service_spec.rb +161 -184
  53. data/spec/services/redirect_flows_service_spec.rb +188 -205
  54. data/spec/services/refunds_service_spec.rb +245 -280
  55. data/spec/services/subscriptions_service_spec.rb +423 -485
  56. data/spec/spec_helper.rb +46 -48
  57. metadata +22 -20
@@ -37,6 +37,7 @@ module GoCardlessPro
37
37
  response = make_request(:post, path, options)
38
38
 
39
39
  return if response.body.nil?
40
+
40
41
  Resources::CustomerBankAccount.new(unenvelope_body(response.body), response)
41
42
  end
42
43
 
@@ -74,11 +75,12 @@ module GoCardlessPro
74
75
  # @param identity # Unique identifier, beginning with "BA".
75
76
  # @param options [Hash] parameters as a hash, under a params key.
76
77
  def get(identity, options = {})
77
- path = sub_url('/customer_bank_accounts/:identity', 'identity' => identity)
78
+ path = sub_url('/customer_bank_accounts/:identity', 'identity' => identity)
78
79
 
79
80
  response = make_request(:get, path, options)
80
81
 
81
82
  return if response.body.nil?
83
+
82
84
  Resources::CustomerBankAccount.new(unenvelope_body(response.body), response)
83
85
  end
84
86
 
@@ -89,7 +91,7 @@ module GoCardlessPro
89
91
  # @param identity # Unique identifier, beginning with "BA".
90
92
  # @param options [Hash] parameters as a hash, under a params key.
91
93
  def update(identity, options = {})
92
- path = sub_url('/customer_bank_accounts/:identity', 'identity' => identity)
94
+ path = sub_url('/customer_bank_accounts/:identity', 'identity' => identity)
93
95
 
94
96
  params = options.delete(:params) || {}
95
97
  options[:params] = {}
@@ -97,6 +99,7 @@ module GoCardlessPro
97
99
  response = make_request(:put, path, options)
98
100
 
99
101
  return if response.body.nil?
102
+
100
103
  Resources::CustomerBankAccount.new(unenvelope_body(response.body), response)
101
104
  end
102
105
 
@@ -113,7 +116,7 @@ module GoCardlessPro
113
116
  # @param identity # Unique identifier, beginning with "BA".
114
117
  # @param options [Hash] parameters as a hash, under a params key.
115
118
  def disable(identity, options = {})
116
- path = sub_url('/customer_bank_accounts/:identity/actions/disable', 'identity' => identity)
119
+ path = sub_url('/customer_bank_accounts/:identity/actions/disable', 'identity' => identity)
117
120
 
118
121
  params = options.delete(:params) || {}
119
122
  options[:params] = {}
@@ -121,6 +124,7 @@ module GoCardlessPro
121
124
  response = make_request(:post, path, options)
122
125
 
123
126
  return if response.body.nil?
127
+
124
128
  Resources::CustomerBankAccount.new(unenvelope_body(response.body), response)
125
129
  end
126
130
 
@@ -22,6 +22,7 @@ module GoCardlessPro
22
22
  response = make_request(:post, path, options)
23
23
 
24
24
  return if response.body.nil?
25
+
25
26
  Resources::Customer.new(unenvelope_body(response.body), response)
26
27
  end
27
28
 
@@ -59,11 +60,12 @@ module GoCardlessPro
59
60
  # @param identity # Unique identifier, beginning with "CU".
60
61
  # @param options [Hash] parameters as a hash, under a params key.
61
62
  def get(identity, options = {})
62
- path = sub_url('/customers/:identity', 'identity' => identity)
63
+ path = sub_url('/customers/:identity', 'identity' => identity)
63
64
 
64
65
  response = make_request(:get, path, options)
65
66
 
66
67
  return if response.body.nil?
68
+
67
69
  Resources::Customer.new(unenvelope_body(response.body), response)
68
70
  end
69
71
 
@@ -74,7 +76,7 @@ module GoCardlessPro
74
76
  # @param identity # Unique identifier, beginning with "CU".
75
77
  # @param options [Hash] parameters as a hash, under a params key.
76
78
  def update(identity, options = {})
77
- path = sub_url('/customers/:identity', 'identity' => identity)
79
+ path = sub_url('/customers/:identity', 'identity' => identity)
78
80
 
79
81
  params = options.delete(:params) || {}
80
82
  options[:params] = {}
@@ -82,6 +84,7 @@ module GoCardlessPro
82
84
  response = make_request(:put, path, options)
83
85
 
84
86
  return if response.body.nil?
87
+
85
88
  Resources::Customer.new(unenvelope_body(response.body), response)
86
89
  end
87
90
 
@@ -43,11 +43,12 @@ module GoCardlessPro
43
43
  # @param identity # Unique identifier, beginning with "EV".
44
44
  # @param options [Hash] parameters as a hash, under a params key.
45
45
  def get(identity, options = {})
46
- path = sub_url('/events/:identity', 'identity' => identity)
46
+ path = sub_url('/events/:identity', 'identity' => identity)
47
47
 
48
48
  response = make_request(:get, path, options)
49
49
 
50
50
  return if response.body.nil?
51
+
51
52
  Resources::Event.new(unenvelope_body(response.body), response)
52
53
  end
53
54
 
@@ -21,7 +21,7 @@ module GoCardlessPro
21
21
  # header to the relevant [ISO
22
22
  # 639-1](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes#Partial_ISO_639_table)
23
23
  # language code. Supported languages are Dutch, English, French, German,
24
- # Italian, Portuguese and Spanish.
24
+ # Italian, Portuguese, Spanish and Swedish.
25
25
  # Example URL: /mandate_pdfs
26
26
  # @param options [Hash] parameters as a hash, under a params key.
27
27
  def create(options = {})
@@ -33,6 +33,7 @@ module GoCardlessPro
33
33
  response = make_request(:post, path, options)
34
34
 
35
35
  return if response.body.nil?
36
+
36
37
  Resources::MandatePdf.new(unenvelope_body(response.body), response)
37
38
  end
38
39
 
@@ -22,11 +22,12 @@ module GoCardlessPro
22
22
  response = make_request(:post, path, options)
23
23
 
24
24
  return if response.body.nil?
25
+
25
26
  Resources::Mandate.new(unenvelope_body(response.body), response)
26
27
  end
27
28
 
28
29
  # Returns a [cursor-paginated](#overview-cursor-pagination) list of your
29
- # mandates. Except where stated, these filters can only be used one at a time.
30
+ # mandates.
30
31
  # Example URL: /mandates
31
32
  # @param options [Hash] parameters as a hash, under a params key.
32
33
  def list(options = {})
@@ -59,11 +60,12 @@ module GoCardlessPro
59
60
  # @param identity # Unique identifier, beginning with "MD".
60
61
  # @param options [Hash] parameters as a hash, under a params key.
61
62
  def get(identity, options = {})
62
- path = sub_url('/mandates/:identity', 'identity' => identity)
63
+ path = sub_url('/mandates/:identity', 'identity' => identity)
63
64
 
64
65
  response = make_request(:get, path, options)
65
66
 
66
67
  return if response.body.nil?
68
+
67
69
  Resources::Mandate.new(unenvelope_body(response.body), response)
68
70
  end
69
71
 
@@ -73,7 +75,7 @@ module GoCardlessPro
73
75
  # @param identity # Unique identifier, beginning with "MD".
74
76
  # @param options [Hash] parameters as a hash, under a params key.
75
77
  def update(identity, options = {})
76
- path = sub_url('/mandates/:identity', 'identity' => identity)
78
+ path = sub_url('/mandates/:identity', 'identity' => identity)
77
79
 
78
80
  params = options.delete(:params) || {}
79
81
  options[:params] = {}
@@ -81,6 +83,7 @@ module GoCardlessPro
81
83
  response = make_request(:put, path, options)
82
84
 
83
85
  return if response.body.nil?
86
+
84
87
  Resources::Mandate.new(unenvelope_body(response.body), response)
85
88
  end
86
89
 
@@ -95,7 +98,7 @@ module GoCardlessPro
95
98
  # @param identity # Unique identifier, beginning with "MD".
96
99
  # @param options [Hash] parameters as a hash, under a params key.
97
100
  def cancel(identity, options = {})
98
- path = sub_url('/mandates/:identity/actions/cancel', 'identity' => identity)
101
+ path = sub_url('/mandates/:identity/actions/cancel', 'identity' => identity)
99
102
 
100
103
  params = options.delete(:params) || {}
101
104
  options[:params] = {}
@@ -103,6 +106,7 @@ module GoCardlessPro
103
106
  response = make_request(:post, path, options)
104
107
 
105
108
  return if response.body.nil?
109
+
106
110
  Resources::Mandate.new(unenvelope_body(response.body), response)
107
111
  end
108
112
 
@@ -123,7 +127,7 @@ module GoCardlessPro
123
127
  # @param identity # Unique identifier, beginning with "MD".
124
128
  # @param options [Hash] parameters as a hash, under a params key.
125
129
  def reinstate(identity, options = {})
126
- path = sub_url('/mandates/:identity/actions/reinstate', 'identity' => identity)
130
+ path = sub_url('/mandates/:identity/actions/reinstate', 'identity' => identity)
127
131
 
128
132
  params = options.delete(:params) || {}
129
133
  options[:params] = {}
@@ -131,6 +135,7 @@ module GoCardlessPro
131
135
  response = make_request(:post, path, options)
132
136
 
133
137
  return if response.body.nil?
138
+
134
139
  Resources::Mandate.new(unenvelope_body(response.body), response)
135
140
  end
136
141
 
@@ -15,8 +15,8 @@ module GoCardlessPro
15
15
  # This
16
16
  # fails with a `mandate_is_inactive` error if the linked
17
17
  # [mandate](#core-endpoints-mandates) is cancelled or has failed. Payments can
18
- # be created against `pending_submission` and `submitted` as well as `active`
19
- # mandates.
18
+ # be created against mandates with status of: `pending_customer_approval`,
19
+ # `pending_submission`, `submitted`, and `active`.
20
20
  # Example URL: /payments
21
21
  # @param options [Hash] parameters as a hash, under a params key.
22
22
  def create(options = {})
@@ -28,6 +28,7 @@ module GoCardlessPro
28
28
  response = make_request(:post, path, options)
29
29
 
30
30
  return if response.body.nil?
31
+
31
32
  Resources::Payment.new(unenvelope_body(response.body), response)
32
33
  end
33
34
 
@@ -65,11 +66,12 @@ module GoCardlessPro
65
66
  # @param identity # Unique identifier, beginning with "PM".
66
67
  # @param options [Hash] parameters as a hash, under a params key.
67
68
  def get(identity, options = {})
68
- path = sub_url('/payments/:identity', 'identity' => identity)
69
+ path = sub_url('/payments/:identity', 'identity' => identity)
69
70
 
70
71
  response = make_request(:get, path, options)
71
72
 
72
73
  return if response.body.nil?
74
+
73
75
  Resources::Payment.new(unenvelope_body(response.body), response)
74
76
  end
75
77
 
@@ -79,7 +81,7 @@ module GoCardlessPro
79
81
  # @param identity # Unique identifier, beginning with "PM".
80
82
  # @param options [Hash] parameters as a hash, under a params key.
81
83
  def update(identity, options = {})
82
- path = sub_url('/payments/:identity', 'identity' => identity)
84
+ path = sub_url('/payments/:identity', 'identity' => identity)
83
85
 
84
86
  params = options.delete(:params) || {}
85
87
  options[:params] = {}
@@ -87,6 +89,7 @@ module GoCardlessPro
87
89
  response = make_request(:put, path, options)
88
90
 
89
91
  return if response.body.nil?
92
+
90
93
  Resources::Payment.new(unenvelope_body(response.body), response)
91
94
  end
92
95
 
@@ -101,7 +104,7 @@ module GoCardlessPro
101
104
  # @param identity # Unique identifier, beginning with "PM".
102
105
  # @param options [Hash] parameters as a hash, under a params key.
103
106
  def cancel(identity, options = {})
104
- path = sub_url('/payments/:identity/actions/cancel', 'identity' => identity)
107
+ path = sub_url('/payments/:identity/actions/cancel', 'identity' => identity)
105
108
 
106
109
  params = options.delete(:params) || {}
107
110
  options[:params] = {}
@@ -109,6 +112,7 @@ module GoCardlessPro
109
112
  response = make_request(:post, path, options)
110
113
 
111
114
  return if response.body.nil?
115
+
112
116
  Resources::Payment.new(unenvelope_body(response.body), response)
113
117
  end
114
118
 
@@ -129,7 +133,7 @@ module GoCardlessPro
129
133
  # @param identity # Unique identifier, beginning with "PM".
130
134
  # @param options [Hash] parameters as a hash, under a params key.
131
135
  def retry(identity, options = {})
132
- path = sub_url('/payments/:identity/actions/retry', 'identity' => identity)
136
+ path = sub_url('/payments/:identity/actions/retry', 'identity' => identity)
133
137
 
134
138
  params = options.delete(:params) || {}
135
139
  options[:params] = {}
@@ -137,6 +141,7 @@ module GoCardlessPro
137
141
  response = make_request(:post, path, options)
138
142
 
139
143
  return if response.body.nil?
144
+
140
145
  Resources::Payment.new(unenvelope_body(response.body), response)
141
146
  end
142
147
 
@@ -46,11 +46,12 @@ module GoCardlessPro
46
46
  # @param identity # Unique identifier, beginning with "PO".
47
47
  # @param options [Hash] parameters as a hash, under a params key.
48
48
  def get(identity, options = {})
49
- path = sub_url('/payouts/:identity', 'identity' => identity)
49
+ path = sub_url('/payouts/:identity', 'identity' => identity)
50
50
 
51
51
  response = make_request(:get, path, options)
52
52
 
53
53
  return if response.body.nil?
54
+
54
55
  Resources::Payout.new(unenvelope_body(response.body), response)
55
56
  end
56
57
 
@@ -11,7 +11,7 @@ module GoCardlessPro
11
11
  # Service for making requests to the RedirectFlow endpoints
12
12
  class RedirectFlowsService < BaseService
13
13
  # Creates a redirect flow object which can then be used to redirect your
14
- # customer to the GoCardless Pro hosted payment pages.
14
+ # customer to the GoCardless hosted payment pages.
15
15
  # Example URL: /redirect_flows
16
16
  # @param options [Hash] parameters as a hash, under a params key.
17
17
  def create(options = {})
@@ -23,6 +23,7 @@ module GoCardlessPro
23
23
  response = make_request(:post, path, options)
24
24
 
25
25
  return if response.body.nil?
26
+
26
27
  Resources::RedirectFlow.new(unenvelope_body(response.body), response)
27
28
  end
28
29
 
@@ -32,11 +33,12 @@ module GoCardlessPro
32
33
  # @param identity # Unique identifier, beginning with "RE".
33
34
  # @param options [Hash] parameters as a hash, under a params key.
34
35
  def get(identity, options = {})
35
- path = sub_url('/redirect_flows/:identity', 'identity' => identity)
36
+ path = sub_url('/redirect_flows/:identity', 'identity' => identity)
36
37
 
37
38
  response = make_request(:get, path, options)
38
39
 
39
40
  return if response.body.nil?
41
+
40
42
  Resources::RedirectFlow.new(unenvelope_body(response.body), response)
41
43
  end
42
44
 
@@ -56,7 +58,7 @@ module GoCardlessPro
56
58
  # @param identity # Unique identifier, beginning with "RE".
57
59
  # @param options [Hash] parameters as a hash, under a params key.
58
60
  def complete(identity, options = {})
59
- path = sub_url('/redirect_flows/:identity/actions/complete', 'identity' => identity)
61
+ path = sub_url('/redirect_flows/:identity/actions/complete', 'identity' => identity)
60
62
 
61
63
  params = options.delete(:params) || {}
62
64
  options[:params] = {}
@@ -64,6 +66,7 @@ module GoCardlessPro
64
66
  response = make_request(:post, path, options)
65
67
 
66
68
  return if response.body.nil?
69
+
67
70
  Resources::RedirectFlow.new(unenvelope_body(response.body), response)
68
71
  end
69
72
 
@@ -40,6 +40,7 @@ module GoCardlessPro
40
40
  response = make_request(:post, path, options)
41
41
 
42
42
  return if response.body.nil?
43
+
43
44
  Resources::Refund.new(unenvelope_body(response.body), response)
44
45
  end
45
46
 
@@ -77,11 +78,12 @@ module GoCardlessPro
77
78
  # @param identity # Unique identifier, beginning with "RF".
78
79
  # @param options [Hash] parameters as a hash, under a params key.
79
80
  def get(identity, options = {})
80
- path = sub_url('/refunds/:identity', 'identity' => identity)
81
+ path = sub_url('/refunds/:identity', 'identity' => identity)
81
82
 
82
83
  response = make_request(:get, path, options)
83
84
 
84
85
  return if response.body.nil?
86
+
85
87
  Resources::Refund.new(unenvelope_body(response.body), response)
86
88
  end
87
89
 
@@ -91,7 +93,7 @@ module GoCardlessPro
91
93
  # @param identity # Unique identifier, beginning with "RF".
92
94
  # @param options [Hash] parameters as a hash, under a params key.
93
95
  def update(identity, options = {})
94
- path = sub_url('/refunds/:identity', 'identity' => identity)
96
+ path = sub_url('/refunds/:identity', 'identity' => identity)
95
97
 
96
98
  params = options.delete(:params) || {}
97
99
  options[:params] = {}
@@ -99,6 +101,7 @@ module GoCardlessPro
99
101
  response = make_request(:put, path, options)
100
102
 
101
103
  return if response.body.nil?
104
+
102
105
  Resources::Refund.new(unenvelope_body(response.body), response)
103
106
  end
104
107
 
@@ -22,6 +22,7 @@ module GoCardlessPro
22
22
  response = make_request(:post, path, options)
23
23
 
24
24
  return if response.body.nil?
25
+
25
26
  Resources::Subscription.new(unenvelope_body(response.body), response)
26
27
  end
27
28
 
@@ -59,11 +60,12 @@ module GoCardlessPro
59
60
  # @param identity # Unique identifier, beginning with "SB".
60
61
  # @param options [Hash] parameters as a hash, under a params key.
61
62
  def get(identity, options = {})
62
- path = sub_url('/subscriptions/:identity', 'identity' => identity)
63
+ path = sub_url('/subscriptions/:identity', 'identity' => identity)
63
64
 
64
65
  response = make_request(:get, path, options)
65
66
 
66
67
  return if response.body.nil?
68
+
67
69
  Resources::Subscription.new(unenvelope_body(response.body), response)
68
70
  end
69
71
 
@@ -73,7 +75,7 @@ module GoCardlessPro
73
75
  # @param identity # Unique identifier, beginning with "SB".
74
76
  # @param options [Hash] parameters as a hash, under a params key.
75
77
  def update(identity, options = {})
76
- path = sub_url('/subscriptions/:identity', 'identity' => identity)
78
+ path = sub_url('/subscriptions/:identity', 'identity' => identity)
77
79
 
78
80
  params = options.delete(:params) || {}
79
81
  options[:params] = {}
@@ -81,6 +83,7 @@ module GoCardlessPro
81
83
  response = make_request(:put, path, options)
82
84
 
83
85
  return if response.body.nil?
86
+
84
87
  Resources::Subscription.new(unenvelope_body(response.body), response)
85
88
  end
86
89
 
@@ -95,7 +98,7 @@ module GoCardlessPro
95
98
  # @param identity # Unique identifier, beginning with "SB".
96
99
  # @param options [Hash] parameters as a hash, under a params key.
97
100
  def cancel(identity, options = {})
98
- path = sub_url('/subscriptions/:identity/actions/cancel', 'identity' => identity)
101
+ path = sub_url('/subscriptions/:identity/actions/cancel', 'identity' => identity)
99
102
 
100
103
  params = options.delete(:params) || {}
101
104
  options[:params] = {}
@@ -103,6 +106,7 @@ module GoCardlessPro
103
106
  response = make_request(:post, path, options)
104
107
 
105
108
  return if response.body.nil?
109
+
106
110
  Resources::Subscription.new(unenvelope_body(response.body), response)
107
111
  end
108
112
 
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  module GoCardlessPro
6
6
  # Current version of the GC gem
7
- VERSION = '1.0.3'
7
+ VERSION = '1.0.4'
8
8
  end
@@ -2,13 +2,13 @@ require 'spec_helper'
2
2
  require 'json'
3
3
 
4
4
  describe GoCardlessPro::ApiResponse do
5
- describe "wrapping a Faraday response" do
5
+ describe 'wrapping a Faraday response' do
6
6
  let(:content_type) { 'application/json' }
7
7
 
8
8
  let(:stubbed) do
9
9
  Faraday::Adapter::Test::Stubs.new do |stub|
10
- stub.get('/testing') do |env|
11
- [200, { 'Content-Type' => content_type}, { test: true }.to_json]
10
+ stub.get('/testing') do |_env|
11
+ [200, { 'Content-Type' => content_type }, { test: true }.to_json]
12
12
  end
13
13
  end
14
14
  end
@@ -23,6 +23,6 @@ describe GoCardlessPro::ApiResponse do
23
23
  specify do
24
24
  expect(api_response.headers).to eql('Content-Type' => content_type)
25
25
  end
26
- specify { expect(api_response.body).to eql("test" => true) }
26
+ specify { expect(api_response.body).to eql('test' => true) }
27
27
  end
28
28
  end