diff options
Diffstat (limited to 'src/repo_ref.rs')
| -rw-r--r-- | src/repo_ref.rs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/repo_ref.rs b/src/repo_ref.rs index 3e8db64..d314e6d 100644 --- a/src/repo_ref.rs +++ b/src/repo_ref.rs | |||
| @@ -136,6 +136,10 @@ impl RepoRef { | |||
| 136 | .map(std::string::ToString::to_string) | 136 | .map(std::string::ToString::to_string) |
| 137 | .collect(), | 137 | .collect(), |
| 138 | ), | 138 | ), |
| 139 | Tag::Generic( | ||
| 140 | nostr::TagKind::Custom("alt".to_string()), | ||
| 141 | vec![format!("git repository: {}", self.name.clone())], | ||
| 142 | ), | ||
| 139 | ], | 143 | ], |
| 140 | // code languages and hashtags | 144 | // code languages and hashtags |
| 141 | ] | 145 | ] |
| @@ -451,6 +455,15 @@ mod tests { | |||
| 451 | .any(|t| t.as_vec()[0].eq("name") && t.as_vec()[1].eq("test name")) | 455 | .any(|t| t.as_vec()[0].eq("name") && t.as_vec()[1].eq("test name")) |
| 452 | ) | 456 | ) |
| 453 | } | 457 | } |
| 458 | |||
| 459 | #[test] | ||
| 460 | fn alt() { | ||
| 461 | assert!( | ||
| 462 | create().tags.iter().any(|t| t.as_vec()[0].eq("alt") | ||
| 463 | && t.as_vec()[1].eq("git repository: test name")) | ||
| 464 | ) | ||
| 465 | } | ||
| 466 | |||
| 454 | #[test] | 467 | #[test] |
| 455 | fn description() { | 468 | fn description() { |
| 456 | assert!(create().tags.iter().any( | 469 | assert!(create().tags.iter().any( |
| @@ -515,7 +528,7 @@ mod tests { | |||
| 515 | 528 | ||
| 516 | #[test] | 529 | #[test] |
| 517 | fn no_other_tags() { | 530 | fn no_other_tags() { |
| 518 | assert_eq!(create().tags.len(), 8) | 531 | assert_eq!(create().tags.len(), 9) |
| 519 | } | 532 | } |
| 520 | } | 533 | } |
| 521 | } | 534 | } |