navidrome/utils/atomic_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
458 B
Go
Raw Normal View History

2020-07-24 21:40:27 +02:00
package utils_test
import (
"github.com/navidrome/navidrome/utils"
2022-07-26 22:47:16 +02:00
. "github.com/onsi/ginkgo/v2"
2020-07-24 21:40:27 +02:00
. "github.com/onsi/gomega"
)
var _ = Describe("AtomicBool", func() {
var b utils.AtomicBool
BeforeEach(func() {
b = utils.AtomicBool{}
})
It("initializes with value = false", func() {
Expect(b.Get()).To(BeFalse())
})
It("sets value", func() {
b.Set(true)
Expect(b.Get()).To(BeTrue())
b.Set(false)
Expect(b.Get()).To(BeFalse())
})
})