projects
/
scpubgit/stemmatology.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
2a377d2
)
making tradition user become a weak ref
collapse-bugfix-auth-merge
Eden Cardim [Mon, 13 Aug 2012 13:29:15 +0000 (10:29 -0300)]
lib/Text/Tradition.pm
patch
|
blob
|
blame
|
history
t/text_tradition_user_collapse.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Text/Tradition.pm
b/lib/Text/Tradition.pm
index
e135da9
..
923ef16
100644
(file)
--- a/
lib/Text/Tradition.pm
+++ b/
lib/Text/Tradition.pm
@@
-61,6
+61,7
@@
has 'user' => (
required => 0,
predicate => 'has_user',
clearer => 'clear_user',
+ weak_ref => 1
);
has 'public' => (
diff --git
a/t/text_tradition_user_collapse.t
b/t/text_tradition_user_collapse.t
index
dca99bb
..
ce8e6bb
100644
(file)
--- a/
t/text_tradition_user_collapse.t
+++ b/
t/text_tradition_user_collapse.t
@@
-50,6
+50,7
@@
my $email = 'john@doe.com';
my $user = $user_store->find_user( { username => 'fred' } );
$user->email('foo@bar.baz');
$user_store->update($user);
+ is(scalar @{$user->traditions}, 1);
}
{