Skip to content

Commit

Permalink
test empty edit args
Browse files Browse the repository at this point in the history
  • Loading branch information
glehmann committed Feb 10, 2024
1 parent 742507e commit 72d3e70
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/edit.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod common;

use common::*;
use predicates::str::is_empty;
use predicates::str::{contains, is_empty};
use pretty_assertions::{assert_eq, assert_ne};
use serde_yaml as sy;
use yage::{check_encrypted, EncryptionStatus};
Expand Down Expand Up @@ -96,3 +96,14 @@ fn edit_key_from_stdin() {
EncryptionStatus::Encrypted
);
}

#[test]
fn edit_empty() {
yage_cmd!("edit")
.assert()
.failure()
.stdout(is_empty())
.stderr(contains(
"error: the following required arguments were not provided",
));
}

0 comments on commit 72d3e70

Please sign in to comment.