Skip to content

Commit a228105

Browse files
committed
Fix test
1 parent 42bb090 commit a228105

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/config/datafile_project_config_spec.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,19 +1078,19 @@
10781078
end
10791079
end
10801080

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'] = []
10851086

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)
10881089

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')
10911091
expect(experiment['cmab']).to eq({'attributeIds' => %w[808797688 808797689], 'trafficAllocation' => 4000})
10921092

1093-
experiment2 = project_config.get_experiment_from_key('test_experiment_2')
1093+
experiment2 = project_config.get_experiment_from_key('test_experiment')
10941094
expect(experiment2['cmab']).to eq(nil)
10951095
end
10961096
end

0 commit comments

Comments
 (0)