Use new rest lib (Update receives all columns that need to be updated)
This commit is contained in:
+2
-2
@@ -49,6 +49,6 @@ func (r *shareRepositoryWrapper) Save(entity interface{}) (string, error) {
|
||||
return id, err
|
||||
}
|
||||
|
||||
func (r *shareRepositoryWrapper) Update(entity interface{}, _ ...string) error {
|
||||
return r.Persistable.Update(entity, "description")
|
||||
func (r *shareRepositoryWrapper) Update(id string, entity interface{}, _ ...string) error {
|
||||
return r.Persistable.Update(id, entity, "description")
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ var _ = Describe("Share", func() {
|
||||
Describe("Update", func() {
|
||||
It("filters out read-only fields", func() {
|
||||
entity := "entity"
|
||||
err := repo.Update(entity)
|
||||
err := repo.Update("id", entity)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(mockedRepo.(*tests.MockShareRepo).Entity).To(Equal("entity"))
|
||||
Expect(mockedRepo.(*tests.MockShareRepo).Cols).To(ConsistOf("description"))
|
||||
|
||||
Reference in New Issue
Block a user