X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-File-KDBX;a=blobdiff_plain;f=t%2Fentry.t;h=3a6267d4a4059301f1d110fef993a80261e8a6ba;hp=6de80287b9974251d272b644971f22a824d6ac3d;hb=4dc2a1996dfcf2dfda3c554daa2f5f59fa763494;hpb=4919a87027c9f0501a636fbea0cbd2a6510afb38 diff --git a/t/entry.t b/t/entry.t index 6de8028..3a6267d 100644 --- a/t/entry.t +++ b/t/entry.t @@ -73,6 +73,14 @@ subtest 'Construction' => sub { }), 'Entry data contains UserName string and the rest default attributes'; }; +subtest 'Accessors' => sub { + my $entry = File::KDBX::Entry->new; + + $entry->creation_time('2022-02-02 12:34:56'); + cmp_ok $entry->creation_time, '==', 1643805296, 'Creation time coerced into a Time::Piece (epoch)'; + is $entry->creation_time->datetime, '2022-02-02T12:34:56', 'Creation time coerced into a Time::Piece'; +}; + subtest 'Custom icons' => sub { plan tests => 10; my $gif = pack('H*', '4749463839610100010000ff002c00000000010001000002003b');