Skip to content

Commit

Permalink
Update tests to support quant-organisation
Browse files Browse the repository at this point in the history
  • Loading branch information
steveworley committed Jul 20, 2023
1 parent 26a4c6f commit ce0a83e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const headers = {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
};
Expand Down Expand Up @@ -151,6 +152,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
'Quant-Skip-Purge': 'true'
Expand Down Expand Up @@ -193,6 +195,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -232,6 +235,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -271,6 +275,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json'
}
Expand Down Expand Up @@ -310,6 +315,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -350,6 +356,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json'
}
Expand Down Expand Up @@ -417,6 +424,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -477,6 +485,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -541,6 +550,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'multipart/form-data',
'Quant-File-Url': '/nala.jpg',
Expand Down Expand Up @@ -576,6 +586,7 @@ describe('Quant Client', function() {
'User-Agent': 'Quant (+http://api.quantcdn.io)',
'Quant-Token': 'test',
'Quant-Customer': 'dev',
'Quant-Organisation': 'dev',
'Quant-Project': 'test',
'Content-Type': 'multipart/form-data',
'Quant-File-Url': '/nala.jpg',
Expand Down
3 changes: 3 additions & 0 deletions test/config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe('Config', function() {
clientid: null,
project: null,
token: null,
bearer: null,
}, null, 2);
expect(writeFileSync.calledOnceWith('./quant.json', data)).to.be.true;
});
Expand All @@ -68,6 +69,7 @@ describe('Config', function() {
clientid: 'test',
project: null,
token: null,
bearer: null,
}, null, 2);
expect(writeFileSync.calledOnceWith('./quant.json', data)).to.be.true;
});
Expand All @@ -79,6 +81,7 @@ describe('Config', function() {
clientid: null,
project: null,
token: null,
bearer: null,
}, null, 2);
expect(writeFileSync.calledOnceWith('/tmp/quant.json', data)).to.be.true;
});
Expand Down

0 comments on commit ce0a83e

Please sign in to comment.