-2
describe("Prefabs basic", function() {
it("It should create simple plrefab", function(done) {
var data = {
name: "Pre",
project: {
_id: settings.projectId,
name: "PM_40"
},
__t: "Prefabs",
stage: "planning",
multiTrade: {
value: false,
companies: []
},
owner: {
user: {
_id: ""
},
company: {
_id: ""
}
},
_customStage: "planning",
dates: [],
dateIndices: {
additional: {},
coord: 0,
deliver: 1
},
fileIndices: [],
todoIndices: [0],
new_prefab: true,
todos: [],
items: {
fileIndices: [],
todoIndices: [],
customId: "1",
name: "Item0",
level: "1",
zone: "west"
},
keywords: ["This is Prefab"]
};
chai
.request(server)
.post("/v3/prefabs/create")
.set("Authorization", settings.authKey)
.send(data)
.end(function(err, res) {
res.should.have.status(200);
prefab = res.body;
prefabId = res.body._id;
console.log(prefab);
});
});
});
如果您希望人們幫助,必須使其可讀性 –