Skip to content

Instantly share code, notes, and snippets.

@TechnotronicOz
Created March 26, 2015 17:01
Show Gist options
  • Select an option

  • Save TechnotronicOz/a4609afb6cf7e0eeac5a to your computer and use it in GitHub Desktop.

Select an option

Save TechnotronicOz/a4609afb6cf7e0eeac5a to your computer and use it in GitHub Desktop.
it.should('allow a uuid to be in segment for multiple buckets', function () {
var uuid = experiments.__util.idGen(),
bucket1 = {
testName: 'bucket collision one',
testType: 'control',
active: true,
diversion: 'cookieMod',
segment: {
low: 0,
high: 1000
},
level: 0,
createdBy: 'Uncle Buck',
updatedBy: 'Uncle Buck'
},
bucket2 = {
testName: 'bucket collision two',
testType: 'control',
active: true,
diversion: 'cookieMod',
segment: {
low: 0,
high: 1000
},
level: 0,
createdBy: 'Uncle Buck',
updatedBy: 'Uncle Buck'
};
return comb.when(facade.experiments.createBucket(bucket1), facade.experiments.createBucket(bucket2)).chain(function (buckets) {
return experiments.bucketsInSegment(uuid).chain(function (bucketsInSegment) {
assert.equal(buckets.length, 2);
assert.equal(bucketsInSegment.length, 2);
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment