summaryrefslogtreecommitdiff
path: root/tests/t0200-edit-tests.sh
blob: 8055c9122ae5462066b5c7c2d914b1c33f25d1ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

test_description='Test edit'
cd "$(dirname "$0")"
. ./setup.sh

test_expect_success 'Test "edit" command' '
	"$PASS" init $KEY1 &&
	"$PASS" generate cred1 90 &&
	export FAKE_EDITOR_PASSWORD="big fat fake password" &&
	export EDITOR="$TEST_HOME/fake-editor-change-password.sh" &&
	"$PASS" edit cred1 &&
	[[ $("$PASS" show cred1) == "$FAKE_EDITOR_PASSWORD" ]]
'

test_done