feat: finish implementing getReportsByAppId method

This commit is contained in:
StevanFreeborn
2023-02-08 23:33:27 -06:00
parent 9c3a8da485
commit 58de996f1e
5 changed files with 294 additions and 17 deletions
+30
View File
@@ -0,0 +1,30 @@
import { Report } from '../src/models/Report';
import { expect } from 'chai';
describe('Report', function () {
it('should be defined', function () {
expect(Report).to.be.not.undefined;
});
it('should have a constructor', function () {
expect(Report).to.have.property('constructor');
});
it('should have a constructor that takes 4 arguments', function () {
expect(Report).to.have.lengthOf(4);
});
it('should create a new instance of Report', function () {
expect(
new Report(1, 1, 'report', 'report description')
).to.be.an.instanceOf(Report);
});
it('should set its properties correctly', function () {
const report = new Report(1, 1, 'report', 'report description');
expect(report.id).to.be.equal(1);
expect(report.appId).to.be.equal(1);
expect(report.name).to.be.equal('report');
expect(report.description).to.be.equal('report description');
});
});