Skip to content

Commit

Permalink
test: cover GetParent
Browse files Browse the repository at this point in the history
  • Loading branch information
dundee committed Feb 10, 2024
1 parent f0b6cd7 commit c3ceb37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/analyze/stored_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,9 @@ func TestRemoveStoredFile(t *testing.T) {

assert.Equal(t, 4, stored.GetItemCount())
assert.Equal(t, int64(5+4096*3), stored.GetSize())

file := stored.GetFiles()[0].GetFiles()[0].GetFiles()[0]
assert.Equal(t, false, file.IsDir())
assert.Equal(t, "file", file.GetName())
assert.Equal(t, "test_dir/nested/subnested", file.GetParent().GetPath())
}

0 comments on commit c3ceb37

Please sign in to comment.