Treat priority as an arbitrary string

This matches what TaskWarrior does: priority is a UDA, and can be
redefined by the user's local config.
This commit is contained in:
Dustin J. Mitchell
2022-03-27 17:48:47 -04:00
parent 0dd2d9cd30
commit 1b586a425f
6 changed files with 31 additions and 62 deletions

View File

@@ -87,7 +87,7 @@ mod test {
use pretty_assertions::assert_eq;
use std::convert::TryInto;
use taskchampion::chrono::{TimeZone, Utc};
use taskchampion::{Priority, Status};
use taskchampion::Status;
use tempfile::TempDir;
#[test]
@@ -113,7 +113,7 @@ mod test {
.unwrap();
assert_eq!(task.get_description(), "snake 🐍");
assert_eq!(task.get_status(), Status::Pending);
assert_eq!(task.get_priority(), Priority::M);
assert_eq!(task.get_priority(), "M");
assert_eq!(task.get_wait(), None);
assert_eq!(
task.get_modified(),
@@ -128,7 +128,7 @@ mod test {
.unwrap();
assert_eq!(task.get_description(), "[TEST] foo");
assert_eq!(task.get_status(), Status::Completed);
assert_eq!(task.get_priority(), Priority::M);
assert_eq!(task.get_priority(), "M".to_string());
assert_eq!(task.get_wait(), None);
assert_eq!(
task.get_modified(),