File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -2927,21 +2927,19 @@ func TestOrganizationDeleteTrigger(t *testing.T) {
2927
2927
t .Run ("WorkspaceExists" , func (t * testing.T ) {
2928
2928
db , _ := dbtestutil .NewDB (t )
2929
2929
2930
- orgA := dbgen .Organization (t , db , database.Organization {})
2931
- _ , err := db .InsertAllUsersGroup (context .Background (), orgA .ID )
2932
- require .NoError (t , err )
2930
+ orgA := dbfake .Organization (t , db ).Do ()
2933
2931
2934
2932
user := dbgen .User (t , db , database.User {})
2935
2933
2936
2934
dbfake .WorkspaceBuild (t , db , database.WorkspaceTable {
2937
- OrganizationID : orgA .ID ,
2935
+ OrganizationID : orgA .Org . ID ,
2938
2936
OwnerID : user .ID ,
2939
2937
}).Do ()
2940
2938
2941
2939
ctx := testutil .Context (t , testutil .WaitShort )
2942
- err = db .UpdateOrganizationDeletedByID (ctx , database.UpdateOrganizationDeletedByIDParams {
2940
+ err : = db .UpdateOrganizationDeletedByID (ctx , database.UpdateOrganizationDeletedByIDParams {
2943
2941
UpdatedAt : dbtime .Now (),
2944
- ID : orgA .ID ,
2942
+ ID : orgA .Org . ID ,
2945
2943
})
2946
2944
require .Error (t , err )
2947
2945
// cannot delete organization: organization has 1 workspaces and 1 templates that must be deleted first
You can’t perform that action at this time.
0 commit comments