summaryrefslogtreecommitdiff
path: root/t/29-app-raps2-store.t
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-07-06 10:15:27 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-07-06 10:15:27 +0200
commit3cc88b443be12b243870e35ddc335a96be6499bb (patch)
tree2e2047a1b5b5c3ea236f880188dd796810510687 /t/29-app-raps2-store.t
parent20907d84f16d74874a61c61cb8698c79e96f04ff (diff)
Merge t/25-app-raps2-basic and t/29-app-raps2-store
Diffstat (limited to 't/29-app-raps2-store.t')
-rw-r--r--t/29-app-raps2-store.t50
1 files changed, 0 insertions, 50 deletions
diff --git a/t/29-app-raps2-store.t b/t/29-app-raps2-store.t
deleted file mode 100644
index 026a529..0000000
--- a/t/29-app-raps2-store.t
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env perl
-use strict;
-use warnings;
-use 5.010;
-
-use Test::More tests => 9;
-
-$ENV{XDG_CONFIG_HOME} = 't/config';
-$ENV{XDG_DATA_HOME} = 't/data';
-
-use_ok('App::Raps2');
-
-my $r2 = App::Raps2->new( master_password => 'sekrit', no_cli => 1 );
-isa_ok( $r2, 'App::Raps2' );
-
-ok( -e 't/config/raps2/password', 'config file created' );
-
-$r2->pw_save(
- password => 'foopass',
- name => 'test1'
- ),
-
- ok( -e 't/data/raps2/test1', 'Save password test1' );
-
-is( $r2->pw_load( name => 'test1' )->{password},
- 'foopass', 'Password for test1 loaded ok' );
-
-$r2->pw_save(
- password => 'foopass',
- file => 't/data/raps2/test2',
- url => 'murl',
- login => 'mlogin',
- extra => 'mextra',
- ),
-
- is( $r2->pw_load_info( file => 't/data/raps2/test2' )->{url},
- 'murl', 'Password info loaded ok (url)' );
-
-is( $r2->pw_load_info( file => 't/data/raps2/test2' )->{login},
- 'mlogin', 'Password info loaded ok (login)' );
-
-is( $r2->pw_load( file => 't/data/raps2/test2' )->{password},
- 'foopass', 'Password for test2 loaded ok' );
-
-is( $r2->pw_load( file => 't/data/raps2/test2' )->{extra},
- 'mextra', 'Extra for test2 loaded ok' );
-
-unlink('t/data/raps2/test1');
-unlink('t/data/raps2/test2');
-unlink('t/config/raps2/password');