From a9e5e97025b35b5a244b1ec458ef5f0d6c17fcdd Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Mon, 7 Aug 2023 15:41:42 -0700 Subject: [PATCH] test_git_push: Test `git.push-branch-prefix` config --- cli/tests/test_git_push.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cli/tests/test_git_push.rs b/cli/tests/test_git_push.rs index 5e3513a86..57dc5e00a 100644 --- a/cli/tests/test_git_push.rs +++ b/cli/tests/test_git_push.rs @@ -273,6 +273,22 @@ fn test_git_push_changes() { Branch changes to push to origin: Force branch push-yostqsxwqrlt from 48d8c7948133 to b5f030322b1d "###); + // Test changing `git.push-branch-prefix`. It causes us to push again. + let stdout = test_env.jj_cmd_success( + &workspace_root, + &[ + "git", + "push", + "--config-toml", + r"git.push-branch-prefix='test-'", + "--change=@", + ], + ); + insta::assert_snapshot!(stdout, @r###" + Creating branch test-yostqsxwqrlt for revision @ + Branch changes to push to origin: + Add branch test-yostqsxwqrlt to b5f030322b1d + "###); } #[test]