Skip to content

Commit

Permalink
test: add set and get current image user data test
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzoddin committed Dec 1, 2023
1 parent a565a67 commit 0ddd6de
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions session/userdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ func TestUserData(t *testing.T) {
assert.NotNil(userImage)
}
})

t.Run("set and get current image", func(t *testing.T) {
s := session.New()
userData := s.Get(2)
fakeImages := newFakeImages()

userData.SetCurrentImage(fakeImages[1])
userCurrentImage := userData.GetCurrentImage()

assert.NotNil(userCurrentImage)
})
}

func newFakeContainers() []*entities.Container {
Expand Down

0 comments on commit 0ddd6de

Please sign in to comment.