()
| 858 | |
| 859 | #[test] |
| 860 | fn test_workspace_mode_selector() { |
| 861 | let bare_promotion = Insert { |
| 862 | command: None, |
| 863 | change: None, |
| 864 | view: None, |
| 865 | deps: true, |
| 866 | allow_conflicts: false, |
| 867 | dry_run: false, |
| 868 | confirm: false, |
| 869 | repository: None, |
| 870 | }; |
| 871 | assert_eq!(bare_promotion.workspace_mode(), WorkspaceTxnMode::Reconcile); |
| 872 | |
| 873 | let preview = Insert { |
| 874 | command: Some(InsertSubcommand::Preview(PreviewArgs { |
| 875 | from_view: "feature".to_string(), |
| 876 | to_view: None, |
| 877 | up_to_tag: None, |
| 878 | })), |
| 879 | ..bare_promotion |
| 880 | }; |
| 881 | assert_eq!(preview.workspace_mode(), WorkspaceTxnMode::Observe); |
| 882 | |
| 883 | let change = Insert { |
| 884 | command: None, |
| 885 | change: Some("change".to_string()), |
| 886 | view: None, |
| 887 | deps: true, |
| 888 | allow_conflicts: false, |
| 889 | dry_run: false, |
| 890 | confirm: false, |
| 891 | repository: None, |
| 892 | }; |
| 893 | assert_eq!(change.workspace_mode(), WorkspaceTxnMode::Reconcile); |
| 894 | |
| 895 | let change_dry_run = Insert { |
| 896 | dry_run: true, |
| 897 | ..change |
| 898 | }; |
| 899 | assert_eq!(change_dry_run.workspace_mode(), WorkspaceTxnMode::Observe); |
| 900 | } |
| 901 | |
| 902 | #[test] |
| 903 | fn test_insert_subcommand_variants() { |
nothing calls this directly
no outgoing calls
no test coverage detected