Fix tests
This commit is contained in:
@ -13,7 +13,7 @@ describe('Client', () => {
|
||||
Client.get('cards', params)
|
||||
.then(response => {
|
||||
expect(response).to.be.a('array');
|
||||
expect(response[0].name).to.equal('Gardevoir');
|
||||
expect(response[0].name).to.equal('Ampharos');
|
||||
});
|
||||
});
|
||||
|
||||
@ -21,7 +21,7 @@ describe('Client', () => {
|
||||
Client.get('cards')
|
||||
.then(response => {
|
||||
expect(response).to.be.a('array');
|
||||
expect(response.length).to.equal(100);
|
||||
expect(response.length).to.equal(250);
|
||||
});
|
||||
});
|
||||
|
||||
@ -56,7 +56,7 @@ describe('Client', () => {
|
||||
.then(response => {
|
||||
expect(response).to.be.a('array');
|
||||
expect(response[0]).to.be.a('object');
|
||||
expect(response[0].code).to.equal('base1');
|
||||
expect(response[0].id).to.equal('base1');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -16,13 +16,8 @@ describe('QueryBuilder', () => {
|
||||
it('should use where to filter data', () => {
|
||||
const params: IQuery[] = [
|
||||
{
|
||||
name: 'name',
|
||||
value: 'Charizard'
|
||||
|
||||
},
|
||||
{
|
||||
name: 'setCode',
|
||||
value: 'base1'
|
||||
name: 'q',
|
||||
value: 'name:Charizard set.id:base1'
|
||||
}
|
||||
];
|
||||
|
||||
@ -30,14 +25,14 @@ describe('QueryBuilder', () => {
|
||||
.then(cards => {
|
||||
expect(cards.length).to.equal(1);
|
||||
expect(cards[0].id).to.equal('base1-4');
|
||||
expect(cards[0].set).to.equal('Base');
|
||||
expect(cards[0].set.name).to.equal('Base');
|
||||
});
|
||||
});
|
||||
|
||||
it('should use all to get all cards', () => {
|
||||
QueryBuilder.all<Card>(Card)
|
||||
.then(cards => {
|
||||
expect(cards.length).to.equal(1000);
|
||||
expect(cards.length).to.equal(250);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user