mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-05 21:47:36 +03:00
Add bookmark in persistence layer
This commit is contained in:
parent
3d4f4b4e2b
commit
2d3ed85311
7 changed files with 172 additions and 25 deletions
|
@ -98,6 +98,24 @@ var _ = Describe("Request Helpers", func() {
|
|||
})
|
||||
})
|
||||
|
||||
Describe("ParamInt64", func() {
|
||||
BeforeEach(func() {
|
||||
r = httptest.NewRequest("GET", "/ping?i=123&inv=123.45", nil)
|
||||
})
|
||||
|
||||
It("returns default value if param does not exist", func() {
|
||||
Expect(ParamInt64(r, "xx", 999)).To(Equal(int64(999)))
|
||||
})
|
||||
|
||||
It("returns default value if param is an invalid int", func() {
|
||||
Expect(ParamInt64(r, "inv", 999)).To(Equal(int64(999)))
|
||||
})
|
||||
|
||||
It("returns parsed time", func() {
|
||||
Expect(ParamInt64(r, "i", 999)).To(Equal(int64(123)))
|
||||
})
|
||||
})
|
||||
|
||||
Describe("ParamInts", func() {
|
||||
BeforeEach(func() {
|
||||
r = httptest.NewRequest("GET", "/ping?i=123&i=456", nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue