|
60 | 60 | it 'should return the variation id on success' do
|
61 | 61 | WebMock.stub_request(:post, expected_url)
|
62 | 62 | .with(body: expected_body_for_webmock, headers: expected_headers)
|
63 |
| - .to_return(status: 200, body: {'predictions' => [{'variationId' => 'abc123'}]}.to_json, headers: {'Content-Type' => 'application/json'}) |
| 63 | + .to_return(status: 200, body: {'predictions' => [{'variation_id' => 'abc123'}]}.to_json, headers: {'Content-Type' => 'application/json'}) |
64 | 64 |
|
65 | 65 | result = client.fetch_decision(rule_id, user_id, attributes, cmab_uuid)
|
66 | 66 |
|
|
137 | 137 | it 'should return the variation id on first try' do
|
138 | 138 | WebMock.stub_request(:post, expected_url)
|
139 | 139 | .with(body: expected_body_for_webmock, headers: expected_headers)
|
140 |
| - .to_return(status: 200, body: {'predictions' => [{'variationId' => 'abc123'}]}.to_json, headers: {'Content-Type' => 'application/json'}) |
| 140 | + .to_return(status: 200, body: {'predictions' => [{'variation_id' => 'abc123'}]}.to_json, headers: {'Content-Type' => 'application/json'}) |
141 | 141 |
|
142 | 142 | result = client_with_retry.fetch_decision(rule_id, user_id, attributes, cmab_uuid)
|
143 | 143 |
|
|
152 | 152 | .with(body: expected_body_for_webmock, headers: expected_headers)
|
153 | 153 | .to_return({status: 500},
|
154 | 154 | {status: 500},
|
155 |
| - {status: 200, body: {'predictions' => [{'variationId' => 'xyz456'}]}.to_json, headers: {'Content-Type' => 'application/json'}}) |
| 155 | + {status: 200, body: {'predictions' => [{'variation_id' => 'xyz456'}]}.to_json, headers: {'Content-Type' => 'application/json'}}) |
156 | 156 |
|
157 | 157 | result = client_with_retry.fetch_decision(rule_id, user_id, attributes, cmab_uuid)
|
158 | 158 |
|
|
0 commit comments