1
0

feat: make default bucket configurable

This commit is contained in:
kolaente
2023-09-03 15:17:17 +02:00
parent bbbb45d224
commit 60bd5c8a79
5 changed files with 49 additions and 37 deletions

View File

@ -170,6 +170,23 @@ func TestTask_Create(t *testing.T) {
assert.Error(t, err)
assert.True(t, IsErrBucketLimitExceeded(err))
})
t.Run("default bucket different", func(t *testing.T) {
db.LoadAndAssertFixtures(t)
s := db.NewSession()
defer s.Close()
task := &Task{
Title: "Lorem",
Description: "Lorem Ipsum Dolor",
ProjectID: 6,
}
err := task.Create(s, usr)
assert.NoError(t, err)
db.AssertExists(t, "tasks", map[string]interface{}{
"id": task.ID,
"bucket_id": 22, // default bucket of project 6 but with a position of 2
}, false)
})
}
func TestTask_Update(t *testing.T) {