model/lockfile: update tests to use get_project
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I2163215bc069431e3d6d53c9c14dd15c6a6a6964
This commit is contained in:
parent
0b5882b1e1
commit
8478c914b5
1 changed files with 2 additions and 6 deletions
|
|
@ -76,11 +76,11 @@ mod tests {
|
||||||
|
|
||||||
lockfile.add_project(create_test_project("test-id", "test-slug"));
|
lockfile.add_project(create_test_project("test-id", "test-slug"));
|
||||||
|
|
||||||
let found = lockfile.find_project("test-id");
|
let found = lockfile.get_project("test-id");
|
||||||
assert!(found.is_some());
|
assert!(found.is_some());
|
||||||
assert_eq!(found.unwrap().pakku_id, Some("test-id".to_string()));
|
assert_eq!(found.unwrap().pakku_id, Some("test-id".to_string()));
|
||||||
|
|
||||||
let not_found = lockfile.find_project("nonexistent");
|
let not_found = lockfile.get_project("nonexistent");
|
||||||
assert!(not_found.is_none());
|
assert!(not_found.is_none());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -604,10 +604,6 @@ impl LockFile {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_project(&self, pakku_id: &str) -> Option<&Project> {
|
|
||||||
self.get_project(pakku_id)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn find_project_mut(&mut self, pakku_id: &str) -> Option<&mut Project> {
|
pub fn find_project_mut(&mut self, pakku_id: &str) -> Option<&mut Project> {
|
||||||
self
|
self
|
||||||
.projects
|
.projects
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue