Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
best-practical
rt-extension-commandbymail
Commits
bf982cb8
Commit
bf982cb8
authored
Aug 31, 2009
by
Kevin Falcone
Browse files
Test that we handle CFs that aren't global sanely
parent
4db66137
Changes
1
Hide whitespace changes
Inline
Side-by-side
t/02.create.t
View file @
bf982cb8
...
...
@@ -3,7 +3,7 @@
use
strict
;
use
warnings
;
use
Test::
More
tests
=>
14
4
;
use
Test::
More
tests
=>
14
7
;
BEGIN
{
require
'
t/utils.pl
'
}
RT::
Init
();
...
...
@@ -300,6 +300,12 @@ diag("accept watcher as username and email address") if $ENV{'TEST_VERBOSE'};
my
(
$id
,
$msg
)
=
$queue
->
Create
(
Name
=>
$queue_name
);
ok
(
$id
,
"
Created queue '
$queue_name
'?
$msg
");
require
RT::
CustomField
;
my
$cf
=
RT::
CustomField
->
new
(
$
RT::
SystemUser
);
my
$cf_name
=
'
test
'
.
rand
$$
;
$cf
->
Create
(
Name
=>
$cf_name
,
Queue
=>
$queue
->
Id
,
Type
=>
'
Freeform
'
);
ok
(
$cf
->
id
,
"
created queue CF
");
my
$user_name
=
"
WatcherCommandTest$$
";
my
$user_email
=
"
watchercommand$$
\@
example.com
";
...
...
@@ -322,6 +328,7 @@ From: root\@localhost
Queue: $queue_name
Owner: $owner
CF.{$cf_name}: fro'b
owner test
END
...
...
@@ -333,6 +340,7 @@ END
ok
(
$ticket
->
IsWatcher
(
Type
=>
'
Owner
',
PrincipalId
=>
$user
->
PrincipalId
),
"
set '
$owner
' as Owner
"
);
is
(
$ticket
->
FirstCustomFieldValue
(
$cf_name
),
"
fro'b
",
'
correct cf value
'
);
}
foreach
my
$cc
(
$user_name
,
$user_email
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment