mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-17 02:25:17 +00:00
test: Add an integration test for disabling untracked files
This commit is contained in:
parent
722a0652fd
commit
470648000f
@ -189,6 +189,33 @@ fn shows_untracked_file() -> io::Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn doesnt_show_untracked_file_if_disabled() -> io::Result<()> {
|
||||
let fixture_repo_dir = create_fixture_repo()?;
|
||||
let repo_dir = common::new_tempdir()?.path().join("rocket");
|
||||
|
||||
Repository::clone(fixture_repo_dir.to_str().unwrap(), &repo_dir.as_path()).unwrap();
|
||||
|
||||
File::create(repo_dir.join("license"))?;
|
||||
|
||||
Command::new("git")
|
||||
.args(&["config", "status.showUntrackedFiles", "no"])
|
||||
.current_dir(repo_dir.as_path())
|
||||
.output()?;
|
||||
|
||||
let output = common::render_module("git_status")
|
||||
.arg("--path")
|
||||
.arg(repo_dir)
|
||||
.output()?;
|
||||
let actual = String::from_utf8(output.stdout).unwrap();
|
||||
let expected = "";
|
||||
|
||||
assert_eq!(expected, actual);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn shows_stashed() -> io::Result<()> {
|
||||
@ -240,7 +267,7 @@ fn shows_modified() -> io::Result<()> {
|
||||
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn shows_added_file() -> io::Result<()> {
|
||||
fn shows_staged_file() -> io::Result<()> {
|
||||
let fixture_repo_dir = create_fixture_repo()?;
|
||||
let repo_dir = common::new_tempdir()?.path().join("rocket");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user