[Bps-public-commit] rt-extension-assets branch, master, updated. 1.0rc1-14-g01fd128
Alex Vandiver
alexmv at bestpractical.com
Wed Feb 19 15:06:07 EST 2014
The branch, master has been updated
via 01fd1282eba6677f88becfa5d84fd7c60e7bcc06 (commit)
via 2f83ff6507bcdd58df17af0289be68a79bd546a8 (commit)
from 237431c4ccaaab98687b402720f6d88e7984ee1b (commit)
Summary of changes:
xt/rights.t | 7 ++++++-
xt/roles.t | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 2f83ff6507bcdd58df17af0289be68a79bd546a8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Feb 19 15:00:26 2014 -0500
Test warned when attempting to link to a non-existant object; create the ticket
diff --git a/xt/rights.t b/xt/rights.t
index cc0ae47..30394b3 100644
--- a/xt/rights.t
+++ b/xt/rights.t
@@ -7,6 +7,12 @@ use RT::Extension::Assets::Test tests => undef;
my $user = RT::Test->load_or_create_user( Name => 'testuser' );
ok $user->id, "Created user";
+my $ticket = RT::Test->create_ticket(
+ Queue => 1,
+ Subject => 'a test ticket',
+);
+ok $ticket->id, "Created ticket";
+
my $catalog_one = create_catalog( Name => "One" );
ok $catalog_one && $catalog_one->id, "Created catalog one";
@@ -64,7 +70,6 @@ diag "ModifyAsset";
ok !$txnid, "Update failed: $txnmsg";
is $asset->Name, "Thinkpad T420s", "Name didn't change";
- # It doesn't matter that ticket #1 doesn't exist for ACLs to refuse us
my ($ok, $msg) = $asset->AddLink( Type => 'RefersTo', Target => 't:1' );
ok !$ok, "No rights to AddLink: $msg";
commit 01fd1282eba6677f88becfa5d84fd7c60e7bcc06
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Feb 19 15:01:15 2014 -0500
RT::ACE::OBJECT_TYPES has been replaced by ->DOES("RT::Record::Role::Rights")
diff --git a/xt/roles.t b/xt/roles.t
index f70e54c..ffaa5d2 100644
--- a/xt/roles.t
+++ b/xt/roles.t
@@ -17,7 +17,7 @@ for my $object ($asset, $catalog, RT->System) {
ok $principal && $principal->id, "Found PrincipalObj for role group"
or next;
- if ($RT::ACE::OBJECT_TYPES{ref $object}) {
+ if ($object->DOES("RT::Record::Role::Rights")) {
my ($ok, $msg) = $principal->GrantRight(
Object => $object,
Right => "ShowAsset",
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list