Add list_tree method to Project, returning an array of
[catagits/Gitalist.git] / t / git / object.t
1 use strict;
2 use warnings;
3 use FindBin qw/$Bin/;
4 use Test::More qw/no_plan/;
5
6 use Data::Dumper;
7
8 BEGIN { use_ok 'Gitalist::Git::Object' }
9
10 my $object = Gitalist::Git::Object->new(
11     sha1 => '729a7c3f6ba5453b42d16a43692205f67fb23bc1',
12     type => 'tree',
13     file => 'dir1',
14     mode => 16384,
15 );
16 isa_ok($object, 'Gitalist::Git::Object');
17
18 warn( Dumper($object) );
19 is($object->{sha1},'729a7c3f6ba5453b42d16a43692205f67fb23bc1', 'sha1 is correct');
20 is($object->{type}, 'tree', 'type is correct');
21 is($object->{file}, 'dir1', 'file is correct');
22 is($object->mode, 16384, 'mode is correct');
23 is($object->modestr, 'd---------', "modestr is correct" );
24