remove(getVideo.spec.js): refs #6005 created task to review the spec
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
1b4ce1a0b5
commit
a35a790155
|
@ -1,40 +0,0 @@
|
||||||
const models = require('vn-loopback/server/server').models;
|
|
||||||
const https = require('https');
|
|
||||||
|
|
||||||
xdescribe('boxing getVideo()', () => {
|
|
||||||
it('should return data', async() => {
|
|
||||||
const tx = await models.PackingSiteConfig.beginTransaction({});
|
|
||||||
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
|
|
||||||
const id = 1;
|
|
||||||
const video = 'video.mp4';
|
|
||||||
|
|
||||||
const response = {
|
|
||||||
pipe: () => {},
|
|
||||||
on: () => {},
|
|
||||||
end: () => {},
|
|
||||||
};
|
|
||||||
|
|
||||||
const req = {
|
|
||||||
headers: 'apiHeader',
|
|
||||||
data: {
|
|
||||||
pipe: () => {},
|
|
||||||
on: () => {},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
spyOn(https, 'request').and.returnValue(response);
|
|
||||||
|
|
||||||
const result = await models.Boxing.getVideo(id, video, req, null, options);
|
|
||||||
|
|
||||||
expect(result[0]).toEqual(response.data.videos[0].filename);
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
Loading…
Reference in New Issue