[otrs-cvs] FAQ/scripts/test FAQ.t,1.20,1.21

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/FAQ/scripts/test
In directory lancelot:/tmp/cvs-serv1581/scripts/test

Modified Files:
	FAQ.t 
Log Message:
Fixed Bug# 9041 - Missing TypeID in FAQ StateGet() API.

Author: cr

Index: FAQ.t
===================================================================
RCS file: /home/cvs/FAQ/scripts/test/FAQ.t,v
retrieving revision 1.20
retrieving revision 1.21
diff -2 -u -d -r1.20 -r1.21
--- FAQ.t	20 Nov 2012 13:10:04 -0000	1.20
+++ FAQ.t	12 Jan 2013 03:35:03 -0000	1.21
@@ -1,5 +1,5 @@
 # --
 # FAQ.t - FAQ tests
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -794,3 +794,40 @@
 );
 
+# -------------------------
+# FAQ State tests
+# -------------------------
+my %States = $FAQObject->StateList(
+    UserID => 1,
+);
+
+$Self->IsNot(
+    scalar keys %States,
+    0,
+    "StateList() number of elements should not be 0"
+);
+
+for my $StateID ( sort keys %States ) {
+    my %State = $FAQObject->StateGet(
+        StateID => $StateID,
+        UserID  => 1,
+    );
+
+    $Self->IsNot(
+        $State{StateID},
+        undef,
+        "StateGet() StateID for StateID: '$StateID' should not be undef"
+    );
+    $Self->IsNot(
+        $State{Name},
+        undef,
+        "StateGet() Name for StateID:    '$StateID' should not be undef"
+    );
+    $Self->IsNot(
+        $State{TypeID},
+        undef,
+        "StateGet() TypeID for StateID:  '$StateID' should not be undef"
+    );
+}
+
+# -------------------------
 1;
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.