@@ -839,7 +839,7 @@ func (s *MethodTestSuite) TestOrganization() {
839
839
_ = dbgen .OrganizationMember (s .T (), db , database.OrganizationMember {UserID : u .ID , OrganizationID : a .ID })
840
840
b := dbgen .Organization (s .T (), db , database.Organization {})
841
841
_ = dbgen .OrganizationMember (s .T (), db , database.OrganizationMember {UserID : u .ID , OrganizationID : b .ID })
842
- check .Args (u .ID ).Asserts (a , policy .ActionRead , b , policy .ActionRead ).Returns (slice .New (a , b ))
842
+ check .Args (database. GetOrganizationsByUserIDParams { UserID : u .ID , Deleted : false } ).Asserts (a , policy .ActionRead , b , policy .ActionRead ).Returns (slice .New (a , b ))
843
843
}))
844
844
s .Run ("InsertOrganization" , s .Subtest (func (db database.Store , check * expects ) {
845
845
check .Args (database.InsertOrganizationParams {
@@ -960,13 +960,14 @@ func (s *MethodTestSuite) TestOrganization() {
960
960
Name : "something-different" ,
961
961
}).Asserts (o , policy .ActionUpdate )
962
962
}))
963
- s .Run ("DeleteOrganization " , s .Subtest (func (db database.Store , check * expects ) {
963
+ s .Run ("UpdateOrganizationDeletedByID " , s .Subtest (func (db database.Store , check * expects ) {
964
964
o := dbgen .Organization (s .T (), db , database.Organization {
965
965
Name : "doomed" ,
966
966
})
967
- check .Args (
968
- o .ID ,
969
- ).Asserts (o , policy .ActionDelete )
967
+ check .Args (database.UpdateOrganizationDeletedByIDParams {
968
+ ID : o .ID ,
969
+ UpdatedAt : o .UpdatedAt ,
970
+ }).Asserts (o , policy .ActionDelete ).Returns ()
970
971
}))
971
972
s .Run ("OrganizationMembers" , s .Subtest (func (db database.Store , check * expects ) {
972
973
o := dbgen .Organization (s .T (), db , database.Organization {})
0 commit comments