@@ -109,13 +109,13 @@ func TestGetWebhookByRepoID(t *testing.T) {
109
109
assert .True (t , IsErrWebhookNotExist (err ))
110
110
}
111
111
112
- func TestGetWebhookByOrgID (t * testing.T ) {
112
+ func TestGetWebhookByOwnerID (t * testing.T ) {
113
113
assert .NoError (t , unittest .PrepareTestDatabase ())
114
- hook , err := GetWebhookByOrgID (3 , 3 )
114
+ hook , err := GetWebhookByOwnerID (3 , 3 )
115
115
assert .NoError (t , err )
116
116
assert .Equal (t , int64 (3 ), hook .ID )
117
117
118
- _ , err = GetWebhookByOrgID (unittest .NonexistentID , unittest .NonexistentID )
118
+ _ , err = GetWebhookByOwnerID (unittest .NonexistentID , unittest .NonexistentID )
119
119
assert .Error (t , err )
120
120
assert .True (t , IsErrWebhookNotExist (err ))
121
121
}
@@ -140,19 +140,19 @@ func TestGetWebhooksByRepoID(t *testing.T) {
140
140
}
141
141
}
142
142
143
- func TestGetActiveWebhooksByOrgID (t * testing.T ) {
143
+ func TestGetActiveWebhooksByOwnerID (t * testing.T ) {
144
144
assert .NoError (t , unittest .PrepareTestDatabase ())
145
- hooks , err := ListWebhooksByOpts (db .DefaultContext , & ListWebhookOptions {OrgID : 3 , IsActive : util .OptionalBoolTrue })
145
+ hooks , err := ListWebhooksByOpts (db .DefaultContext , & ListWebhookOptions {OwnerID : 3 , IsActive : util .OptionalBoolTrue })
146
146
assert .NoError (t , err )
147
147
if assert .Len (t , hooks , 1 ) {
148
148
assert .Equal (t , int64 (3 ), hooks [0 ].ID )
149
149
assert .True (t , hooks [0 ].IsActive )
150
150
}
151
151
}
152
152
153
- func TestGetWebhooksByOrgID (t * testing.T ) {
153
+ func TestGetWebhooksByOwnerID (t * testing.T ) {
154
154
assert .NoError (t , unittest .PrepareTestDatabase ())
155
- hooks , err := ListWebhooksByOpts (db .DefaultContext , & ListWebhookOptions {OrgID : 3 })
155
+ hooks , err := ListWebhooksByOpts (db .DefaultContext , & ListWebhookOptions {OwnerID : 3 })
156
156
assert .NoError (t , err )
157
157
if assert .Len (t , hooks , 1 ) {
158
158
assert .Equal (t , int64 (3 ), hooks [0 ].ID )
@@ -181,13 +181,13 @@ func TestDeleteWebhookByRepoID(t *testing.T) {
181
181
assert .True (t , IsErrWebhookNotExist (err ))
182
182
}
183
183
184
- func TestDeleteWebhookByOrgID (t * testing.T ) {
184
+ func TestDeleteWebhookByOwnerID (t * testing.T ) {
185
185
assert .NoError (t , unittest .PrepareTestDatabase ())
186
- unittest .AssertExistsAndLoadBean (t , & Webhook {ID : 3 , OrgID : 3 })
187
- assert .NoError (t , DeleteWebhookByOrgID (3 , 3 ))
188
- unittest .AssertNotExistsBean (t , & Webhook {ID : 3 , OrgID : 3 })
186
+ unittest .AssertExistsAndLoadBean (t , & Webhook {ID : 3 , OwnerID : 3 })
187
+ assert .NoError (t , DeleteWebhookByOwnerID (3 , 3 ))
188
+ unittest .AssertNotExistsBean (t , & Webhook {ID : 3 , OwnerID : 3 })
189
189
190
- err := DeleteWebhookByOrgID (unittest .NonexistentID , unittest .NonexistentID )
190
+ err := DeleteWebhookByOwnerID (unittest .NonexistentID , unittest .NonexistentID )
191
191
assert .Error (t , err )
192
192
assert .True (t , IsErrWebhookNotExist (err ))
193
193
}
0 commit comments