@@ -109,13 +109,13 @@ func TestGetWebhookByRepoID(t *testing.T) {
109109 assert .True (t , IsErrWebhookNotExist (err ))
110110}
111111
112- func TestGetWebhookByOrgID (t * testing.T ) {
112+ func TestGetWebhookByOwnerID (t * testing.T ) {
113113 assert .NoError (t , unittest .PrepareTestDatabase ())
114- hook , err := GetWebhookByOrgID (3 , 3 )
114+ hook , err := GetWebhookByOwnerID (3 , 3 )
115115 assert .NoError (t , err )
116116 assert .Equal (t , int64 (3 ), hook .ID )
117117
118- _ , err = GetWebhookByOrgID (unittest .NonexistentID , unittest .NonexistentID )
118+ _ , err = GetWebhookByOwnerID (unittest .NonexistentID , unittest .NonexistentID )
119119 assert .Error (t , err )
120120 assert .True (t , IsErrWebhookNotExist (err ))
121121}
@@ -140,19 +140,19 @@ func TestGetWebhooksByRepoID(t *testing.T) {
140140 }
141141}
142142
143- func TestGetActiveWebhooksByOrgID (t * testing.T ) {
143+ func TestGetActiveWebhooksByOwnerID (t * testing.T ) {
144144 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 })
146146 assert .NoError (t , err )
147147 if assert .Len (t , hooks , 1 ) {
148148 assert .Equal (t , int64 (3 ), hooks [0 ].ID )
149149 assert .True (t , hooks [0 ].IsActive )
150150 }
151151}
152152
153- func TestGetWebhooksByOrgID (t * testing.T ) {
153+ func TestGetWebhooksByOwnerID (t * testing.T ) {
154154 assert .NoError (t , unittest .PrepareTestDatabase ())
155- hooks , err := ListWebhooksByOpts (db .DefaultContext , & ListWebhookOptions {OrgID : 3 })
155+ hooks , err := ListWebhooksByOpts (db .DefaultContext , & ListWebhookOptions {OwnerID : 3 })
156156 assert .NoError (t , err )
157157 if assert .Len (t , hooks , 1 ) {
158158 assert .Equal (t , int64 (3 ), hooks [0 ].ID )
@@ -181,13 +181,13 @@ func TestDeleteWebhookByRepoID(t *testing.T) {
181181 assert .True (t , IsErrWebhookNotExist (err ))
182182}
183183
184- func TestDeleteWebhookByOrgID (t * testing.T ) {
184+ func TestDeleteWebhookByOwnerID (t * testing.T ) {
185185 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 })
189189
190- err := DeleteWebhookByOrgID (unittest .NonexistentID , unittest .NonexistentID )
190+ err := DeleteWebhookByOwnerID (unittest .NonexistentID , unittest .NonexistentID )
191191 assert .Error (t , err )
192192 assert .True (t , IsErrWebhookNotExist (err ))
193193}
0 commit comments