add tests
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Thu, 10 Jul 2014 19:57:05 +0000 (19:57 +0000)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Thu, 10 Jul 2014 19:57:05 +0000 (19:57 +0000)
test/specs/incident.js

index 509d231..ba4e2db 100644 (file)
@@ -122,6 +122,16 @@ setTimeout:true, before:true, clearTimeout:true, exports:true, it:true, describe
         incidentModel.set("assignedTo", new XM.UserAccountRelation());
         assert.equal(incidentModel.get("status"), XM.Incident.ASSIGNED);
       });
+      it("Incident status does not revert to assigned from closed when user is assigned to it", function () {
+        incidentModel.set("status", XM.Incident.CLOSED);
+        incidentModel.set("assignedTo", new XM.UserAccountRelation());
+        assert.equal(incidentModel.get("status"), XM.Incident.CLOSED);
+      });
+      it("Incident status does not revert to assigned from resolved when user is assigned to it", function () {
+        incidentModel.set("status", XM.Incident.RESOLVED);
+        incidentModel.set("assignedTo", new XM.UserAccountRelation());
+        assert.equal(incidentModel.get("status"), XM.Incident.RESOLVED);
+      });
     });
     /**
     @member Privileges