File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1078
1078
end
1079
1079
end
1080
1080
1081
- describe 'test_cmab_field_population' do
1082
- config_dict = Marshal . load ( Marshal . dump ( OptimizelySpec ::VALID_CONFIG_BODY ) )
1083
- config_dict [ 'experiments' ] [ 0 ] [ 'cmab' ] = { 'attributeIds' => %w[ 808797688 808797689 ] , 'trafficAllocation' => 4000 }
1084
- config_dict [ 'experiments' ] [ 0 ] [ 'trafficAllocation' ] = [ ]
1081
+ describe '#test_cmab_field_population' do
1082
+ it 'Should return CMAB details' do
1083
+ config_dict = Marshal . load ( Marshal . dump ( OptimizelySpec ::VALID_CONFIG_BODY ) )
1084
+ config_dict [ 'experiments' ] [ 0 ] [ 'cmab' ] = { 'attributeIds' => %w[ 808797688 808797689 ] , 'trafficAllocation' => 4000 }
1085
+ config_dict [ 'experiments' ] [ 0 ] [ 'trafficAllocation' ] = [ ]
1085
1086
1086
- config_json = JSON . dump ( config_dict )
1087
- project_config = Optimizely ::DatafileProjectConfig . new ( config_json , logger , error_handler )
1087
+ config_json = JSON . dump ( config_dict )
1088
+ project_config = Optimizely ::DatafileProjectConfig . new ( config_json , logger , error_handler )
1088
1089
1089
- it 'Should return CMAB details' do
1090
- experiment = project_config . get_experiment_from_key ( 'test_experiment' )
1090
+ experiment = project_config . get_experiment_from_key ( 'test_experiment_with_audience' )
1091
1091
expect ( experiment [ 'cmab' ] ) . to eq ( { 'attributeIds' => %w[ 808797688 808797689 ] , 'trafficAllocation' => 4000 } )
1092
1092
1093
- experiment2 = project_config . get_experiment_from_key ( 'test_experiment_2 ' )
1093
+ experiment2 = project_config . get_experiment_from_key ( 'test_experiment ' )
1094
1094
expect ( experiment2 [ 'cmab' ] ) . to eq ( nil )
1095
1095
end
1096
1096
end
You can’t perform that action at this time.
0 commit comments