tests: use jj_cmd_success() in one more place

This commit is contained in:
Martin von Zweigbergk 2022-04-14 22:48:40 -07:00 committed by Martin von Zweigbergk
parent 3c71ae3c76
commit bd035004b9

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::common::{get_stdout_string, TestEnvironment};
use crate::common::TestEnvironment;
pub mod common;
@ -25,11 +25,8 @@ fn test_new_with_message() {
test_env.jj_cmd_success(&repo_path, &["describe", "-m", "add a file"]);
test_env.jj_cmd_success(&repo_path, &["new", "-m", "a new commit"]);
let assert = test_env
.jj_cmd(&repo_path, &["log", "-T", "commit_id \" \" description"])
.assert()
.success();
insta::assert_snapshot!(get_stdout_string(&assert), @r###"
let stdout = test_env.jj_cmd_success(&repo_path, &["log", "-T", "commit_id \" \" description"]);
insta::assert_snapshot!(stdout, @r###"
@ 88436dbcdbedc2b8a6ebd0687981906d09ccc68f a new commit
o 51e9c5819117991e4a6dc5a4a744283fc74f0746 add a file
o 0000000000000000000000000000000000000000