Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const chai = require('chai')
- chai.use(require('./node_modules/chai-like'))
- chai.use(require('./node_modules/chai-http'))
- const { app, routes, users, deliveryReceipt } = require('../config')
- const { getApi, waitApi, wrapHttp, expectDefaultResponse, expectDefaultErrorResponse } = require('../helpers')
- const { expect } = chai
- describe('test Fuelling Additional Request No Percentage', () => {
- const afFlightApi = getApi(app.afBaseUrl).withPrefix(routes.flights)
- let flightId = 'unspecified'
- let taskId = 'unspecified'
- let paymentDraftId = 'unspecified'
- let fuellingId = 'unspecified'
- before(async () => {
- await Promise.all([afFlightApi.login(users.defaultAfUser)
- })
- describe('when user create a new flight with name SU100', () => {
- it('it should success and create a task', async () => {
- const newTask = {
- reference: '№ 12324 от 25.03.2018',
- flight_id: flightId,
- order_id: orderId,
- vehicle_id: 'VH_45_FM_02',
- operator: {
- id: 'OPER_123',
- name: 'Петров Петр Петрович'
- }
- }
- const response = await wrapHttp(gpnTaskApi.post().send(newTask))
- expectDefaultResponse(response)
- const result = response.body.result
- expect(result).to.not.be.null
- taskId = result
- console.log(taskId)
- })
- })
- })
Advertisement
Add Comment
Please, Sign In to add comment