Skip to content

Commit

Permalink
test: use TestManager
Browse files Browse the repository at this point in the history
  • Loading branch information
wafuwafu13 committed Oct 3, 2023
1 parent 795220d commit 4f36010
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ use predicates::prelude::*; // Used for writing assertions

#[tokio::test]
async fn test_apply() -> Result<(), Box<dyn std::error::Error>> {
let mut c = util::setup().await?;
let cmd = c.args(&["--region", "local", "admin", "apply", "--dev"]);
let tm = util::setup().await?;
let mut c = tm.command()?;
let cmd = c.args(&["--region", "local", "admin", "apply"]);
cmd.assert()
.success()
.stdout(predicate::str::contains("not yet implemented"));
Expand All @@ -32,7 +33,8 @@ async fn test_apply() -> Result<(), Box<dyn std::error::Error>> {
#[tokio::test]
#[should_panic(expected = "not yet implemented")]
async fn test_apply_with_dev() {
let mut c = util::setup().await.unwrap();
let tm = util::setup().await.unwrap();
let mut c = tm.command().unwrap();
let cmd = c.args(&["--region", "local", "admin", "apply", "--dev"]);
cmd.unwrap();
}

0 comments on commit 4f36010

Please sign in to comment.