Skip to content

Commit

Permalink
remove duplicated 33across ID test
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosfelix committed Dec 15, 2023
1 parent f16a5fb commit 6ffeb3d
Showing 1 changed file with 2 additions and 34 deletions.
36 changes: 2 additions & 34 deletions test/spec/modules/33acrossIdSystem_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ describe('33acrossIdSystem', () => {
});
});

context('if the response doesn\'t include a first-party ID', () => {
it('should try to remove any first-party ID that could be stored', () => {
context('if the response lacks a first-party ID', () => {
it('should wipe any existing first-party ID from storage', () => {
const completeCallback = () => {};

const { callback } = thirthyThreeAcrossIdSubmodule.getId({
Expand Down Expand Up @@ -167,38 +167,6 @@ describe('33acrossIdSystem', () => {
});
});

context('if the response lacks a first-party ID', () => {
it('should wipe any existing first-party ID from storage', () => {
const completeCallback = () => {};

const { callback } = thirthyThreeAcrossIdSubmodule.getId({
params: {
pid: '12345'
}
});

callback(completeCallback);

const [request] = server.requests;

const removeDataFromLocalStorage = sinon.stub(storage, 'removeDataFromLocalStorage');

request.respond(200, {
'Content-Type': 'application/json'
}, JSON.stringify({
succeeded: true,
data: {
envelope: 'foo'
},
expires: 1645667805067
}));

expect(removeDataFromLocalStorage.calledOnceWithExactly('33acrossIdFp')).to.be.true;

removeDataFromLocalStorage.restore();
});
});

context('when GDPR applies', () => {
it('should call endpoint with \'gdpr=1\'', () => {
const completeCallback = () => {};
Expand Down

0 comments on commit 6ffeb3d

Please sign in to comment.