Skip to content

Commit

Permalink
Added test for #106
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Jun 30, 2024
1 parent 962c010 commit af5167d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,27 @@ def test_cli_remove(test_file):
assert data["kMDItemAuthors"] == ["Jane Doe"]


def test_cli_remove_tags_without_color(test_file):
"""Test --remove tags without specifying color (#106)"""

runner = CliRunner()
result = runner.invoke(cli, ["--set", "tags", ".Test,red", test_file.name])
snooze(LONG_SNOOZE)

md = OSXMetaData(test_file.name)
assert md.tags == [Tag(".Test", 6)]

result = runner.invoke(
cli,
["--remove", "tags", ".Test", test_file.name],
)
assert result.exit_code == 0

snooze(LONG_SNOOZE)
md = OSXMetaData(test_file.name)
assert not md.tags


def test_cli_mirror(test_file):
"""Test --mirror"""

Expand Down

0 comments on commit af5167d

Please sign in to comment.