Changeset 1867
- Timestamp:
- 04/11/08 19:24:55 (4 months ago)
- Files:
-
- branches/feature-narrow-tables/t/22-author.t (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/feature-narrow-tables/t/22-author.t
r1848 r1867 8 8 use lib 'extlib'; 9 9 10 use Test::More tests => 6 0;10 use Test::More tests => 64; 11 11 12 12 use MT; … … 63 63 ok(eval { $author->widgets(); 1 }, 'Author obj has widgets accessor'); 64 64 ok(!defined $author->widgets, "Author's widgets are undefined by default"); 65 ok(!defined $author->favorite_blogs, "Author's favorite blogs are undefined by default"); 65 66 66 67 # same as in MT::CMS::Dashboard, but that's not necessary … … 73 74 }; 74 75 76 my $fav_blogs = [1, 7]; # not actually a blog #7, but meh 77 75 78 ok($author->widgets($default_widgets), "Author's widgets can be set"); 79 ok($author->favorite_blogs($fav_blogs), "Author's favorite blogs can be set"); 76 80 ok($author->save(), "Author with modified widgets can be saved"); 77 81 … … 80 84 81 85 $author = MT::Author->load({ name => 'Chuck D' }); 86 82 87 ok($author->widgets, "Modified author has widgets"); 83 diag(Data::Dumper::Dumper($author->widgets));84 88 is_deeply($author->widgets, $default_widgets, "Author's widgets survived being saved accurately"); 89 90 ok($author->favorite_blogs, "Modified author has favorite blogs"); 91 is_deeply($author->favorite_blogs, $fav_blogs, "Author's favorite blogs survived being saved accurately"); 85 92 } 86 93
