UNPKG

@gameroom/kit

Version:

Node kit for the Gameroom API

59 lines (54 loc) 1.51 kB
const chai = require('chai') const { models: { Price_Extended } } = require('../../') const should = chai.should() let object describe('Price_Extended', () => { describe('Price_Extended.get()', () => { it('should get array of price_extendeds', async () => { let result, error try { result = await Price_Extended.get() } catch (err) { error = err } should.not.exist(error) should.exist(result) result.should.be.a('array') object = result[0] }) }) describe('Price_Extended.getAll()', () => { it('should get array of all price_extendeds', async () => { let result, error try { result = await Price_Extended.getAll() } catch (err) { error = err } should.not.exist(error) should.exist(result) result.should.be.a('array') }) }) describe('Price_Extended.find()', () => { it('should find a price_extended', async () => { let result, error try { result = await Price_Extended.find(object) } catch (err) { error = err } should.not.exist(error) should.exist(result) result.should.be.a('object') }) }) describe('Price_Extended keys', () => { it('should match api and kit keys', async () => { const raw = await Price_Extended.schema.adapter.find(Price_Extended.schema, object.id) Object.keys(new Price_Extended()).sort().should.deep.equal(Object.keys(raw).sort()) }) }) })