fixing tests
[xtuple] / test / specs / shift.js
1 /*jshint indent:2, curly:true, eqeqeq:true, immed:true, latedef:true,
2 newcap:true, noarg:true, regexp:true, undef:true, strict:true, trailing:true,
3 white:true*/
4 /*global XV:true, XT:true, _:true, console:true, XM:true, Backbone:true, require:true, assert:true,
5 setTimeout:true, before:true, clearTimeout:true, exports:true, it:true, describe:true, beforeEach:true */
6
7 (function () {
8   "use strict";
9
10   /**
11     @class
12     @alias Shifts
13     @property {String} number
14     @property {String} name
15   */
16   var spec = {
17     recordType: "XM.Shift",
18     collectionType: "XM.ShiftCollection",
19     listKind: "XV.ShiftList",
20     instanceOf: "XM.Document",
21     /**
22       @member -
23       @memberof Shift
24       @description Shifts are lockable.
25     */
26     isLockable: true,
27     attributes: ["id", "name", "number"],
28     requiredAttributes: ["name", "number"],
29     /**
30     @member -
31     @memberof Shift
32     @description Used in the Time & Expense modules
33     */
34     extensions: ["time_expense"],
35     /**
36       @member -
37       @memberof Shift
38       @description Shifts can be read by all users and can be created, updated,
39         or deleted by users with the "MaintainShifts" privilege.
40     */
41     privileges: {
42       createUpdateDelete: true,
43       read: true
44     },
45     createHash: {
46       name: "First" + Math.random(),
47       number: "FIRST" + Math.random()
48     },
49     updateHash: {
50       name: "Second" + Math.random()
51     }
52   };
53
54   exports.spec = spec;
55
56 }());