message: API: Generalize TestHelper request methods
diff: @@ -24,19 +24,27 @@ export class TestHelper {
  await this.fixtureLoader.load();
  }
  - public async commonUserGetRequest(user: IUser, urlPostfix: string, queryOptions?: string | object) {
  + public async basicUserGetRequest(user: IUser, url: string, queryOptions?: string | object) {
  return await chai.request(this.app)
  - .get(this.baseUrl + urlPostfix)
  + .get(url)
  .query(queryOptions)
  .set('Cookie', `token=${JwtUtils.generateToken(user)}`)
  .catch((err) => err.response);
  }
  - public async commonUserPostRequest(user: IUser, urlPostfix: string, sendData?: string | object) {
  + public async basicUserPostRequest(user: IUser, url: string, sendData?: string | object) {
  return await chai.request(this.app)
  - .post(this.baseUrl + urlPostfix)
  + .post(url)
  .set('Cookie', `token=${JwtUtils.generateToken(user)}`)
  .send(sendData)
  .catch((err) => err.response);
  }
  +
  + public async commonUserGetRequest(user: IUser, urlPostfix: string, queryOptions?: string | object) {
  + return await this.basicUserGetRequest(user, this.baseUrl + urlPostfix, queryOptions);
  + }
  +
  + public async commonUserPostRequest(user: IUser, urlPostfix: string, sendData?: string | object) {
  + return await this.basicUserPostRequest(user, this.baseUrl + urlPostfix, sendData);
  + }
  }
  