|
1 | 1 | # |
2 | | -# Copyright 2016, Optimizely and contributors |
| 2 | +# Copyright 2016-2017, Optimizely and contributors |
3 | 3 | # |
4 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | # you may not use this file except in compliance with the License. |
|
35 | 35 | time_now = Time.now |
36 | 36 | allow(Time).to receive(:now).and_return(time_now) |
37 | 37 |
|
38 | | - @expected_impression_url = 'https://p13nlog.dz.optimizely.com/log/decision' |
| 38 | + @expected_impression_url = 'https://logx.optimizely.com/log/decision' |
39 | 39 | @expected_impression_params = { |
40 | 40 | 'visitorId' => 'test_user', |
41 | 41 | 'timestamp' => (time_now.to_f * 1000).to_i, |
|
53 | 53 | 'userFeatures' => [], |
54 | 54 | } |
55 | 55 |
|
56 | | - @expected_conversion_url = 'https://p13nlog.dz.optimizely.com/log/event' |
| 56 | + @expected_conversion_url = 'https://logx.optimizely.com/log/event' |
57 | 57 | @expected_conversion_params = { |
58 | 58 | 'visitorId' => 'test_user', |
59 | 59 | 'timestamp' => (time_now.to_f * 1000).to_i, |
|
130 | 130 | }] |
131 | 131 | @expected_conversion_params['eventFeatures'] = [ |
132 | 132 | { |
133 | | - 'id' => 'revenue', |
| 133 | + 'name' => 'revenue', |
134 | 134 | 'type' => 'custom', |
135 | 135 | 'value' => 4200, |
136 | 136 | 'shouldIndex' => false |
|
149 | 149 | @expected_conversion_params['eventMetrics'] = [] |
150 | 150 | @expected_conversion_params['eventFeatures'] = [ |
151 | 151 | { |
152 | | - 'id' => 'revenue', |
| 152 | + 'name' => 'revenue', |
153 | 153 | 'type' => 'custom', |
154 | 154 | 'value' => "4200", |
155 | 155 | 'shouldIndex' => false |
|
167 | 167 | it 'should create a valid V2 Event when create_conversion_event is called with boolean event tag' do |
168 | 168 | @expected_conversion_params['eventFeatures'] = [ |
169 | 169 | { |
170 | | - 'id' => 'boolean_tag', |
| 170 | + 'name' => 'boolean_tag', |
171 | 171 | 'type' => 'custom', |
172 | 172 | 'value' => false, |
173 | 173 | 'shouldIndex' => false |
|
188 | 188 | it 'should create a valid V2 Event when create_conversion_event is called with string event tag' do |
189 | 189 | @expected_conversion_params['eventFeatures'] = [ |
190 | 190 | { |
191 | | - 'id' => 'string_tag', |
| 191 | + 'name' => 'string_tag', |
192 | 192 | 'type' => 'custom', |
193 | 193 | 'value' => 'iamstring', |
194 | 194 | 'shouldIndex' => false |
|
208 | 208 | it 'should create a valid V2 Event when create_conversion_event is called with integer event tag' do |
209 | 209 | @expected_conversion_params['eventFeatures'] = [ |
210 | 210 | { |
211 | | - 'id' => 'integer_tag', |
| 211 | + 'name' => 'integer_tag', |
212 | 212 | 'type' => 'custom', |
213 | 213 | 'value' => 42, |
214 | 214 | 'shouldIndex' => false |
|
228 | 228 | it 'should create a valid V2 Event when create_conversion_event is called with float event tag' do |
229 | 229 | @expected_conversion_params['eventFeatures'] = [ |
230 | 230 | { |
231 | | - 'id' => 'float_tag', |
| 231 | + 'name' => 'float_tag', |
232 | 232 | 'type' => 'custom', |
233 | 233 | 'value' => 42.01, |
234 | 234 | 'shouldIndex' => false |
|
0 commit comments