Skip to content

Commit

Permalink
Add currently failing test to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgalex committed May 30, 2019
1 parent aceaf20 commit 46c4416
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,22 @@ mod tests {
assert_eq!(images.index, images.max_viewable_index());
}

#[test]
fn test_soft_maximum_limits_current_glob_on_image_delete() {
let mut images = dummy_paths_builder(50).with_maximum_viewable(2).build();
images.increment(99);
images.remove_current_image();
assert_eq!(images.max_viewable_index(), Some(0));
}

#[test]
fn test_soft_cap_after_delete_at_end() {
let mut images = dummy_paths_builder(50).build();
images.increment(99);
images.remove_current_image();
assert_eq!(images.max_viewable_index(), Some(48));
}

#[test]
fn test_increment_image() {
let mut images = dummy_paths_builder(50).build();
Expand Down

0 comments on commit 46c4416

Please sign in to comment.