'use strict';

var _mocha = require('mocha');

var _supertest = require('supertest');

var _supertest2 = _interopRequireDefault(_supertest);

var _integrationSpecInt = require('../_integration.spec-int.js');

var _integrationSpecInt2 = _interopRequireDefault(_integrationSpecInt);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

(0, _mocha.describe)('BehaviorAllowPut', function () {

    (0, _mocha.describe)('allowPut enabled', function () {

        var request = (0, _supertest2.default)(_integrationSpecInt2.default.urlPrefix);

        (0, _mocha.it)('should allow put', function (done) {

            request.put(_integrationSpecInt2.default.testUrl('allowPut.enabled.papi.json')).expect(200).end(done);
        });
    });

    (0, _mocha.describe)('allowPutt disabled', function () {

        var request = (0, _supertest2.default)(_integrationSpecInt2.default.urlPrefix);

        (0, _mocha.it)('should return not allowed status code', function (done) {

            request.put(_integrationSpecInt2.default.testUrl('allowPut.disabled.papi.json')).expect(405).end(done);
        });
    });
});