@@ -36,6 +36,7 @@ func TestWebhook(t *testing.T) {
3636 opt := & bitbucket.WebhooksOptions {
3737 Owner : owner ,
3838 RepoSlug : repo ,
39+ Secret : "unsecureSecret" ,
3940 Description : "go-bb-test" ,
4041 Url : "https://example.com" ,
4142 Active : false ,
@@ -63,6 +64,9 @@ func TestWebhook(t *testing.T) {
6364 if len (webhook .Events ) != 2 {
6465 t .Error ("The webhook `events` attribute does not match the expected value." )
6566 }
67+ if webhook .Secret != "unsecureSecret" {
68+ t .Error ("The webhook `secret` attribute does not match the expected value." )
69+ }
6670
6771 webhookResourceUuid = webhook .Uuid
6872 })
@@ -94,13 +98,17 @@ func TestWebhook(t *testing.T) {
9498 if len (webhook .Events ) != 2 {
9599 t .Error ("The webhook `events` attribute does not match the expected value." )
96100 }
101+ if webhook .Secret != "unsecureSecret" {
102+ t .Error ("The webhook `secret` attribute does not match the expected value." )
103+ }
97104 })
98105
99106 t .Run ("update" , func (t * testing.T ) {
100107 opt := & bitbucket.WebhooksOptions {
101108 Owner : owner ,
102109 RepoSlug : repo ,
103110 Uuid : webhookResourceUuid ,
111+ Secret : "newUnsecureSecret" ,
104112 Description : "go-bb-test-new" ,
105113 Url : "https://new-example.com" ,
106114 Events : []string {bitbucket .RepoPushEvent , bitbucket .IssueCreatedEvent , bitbucket .RepoForkEvent },
@@ -126,6 +134,9 @@ func TestWebhook(t *testing.T) {
126134 if len (webhook .Events ) != 3 {
127135 t .Error ("The webhook `events` attribute does not match the expected value." )
128136 }
137+ if webhook .Secret != "newUnsecureSecret" {
138+ t .Error ("The webhook `secret` attribute does not match the expected value." )
139+ }
129140 })
130141
131142 t .Run ("delete" , func (t * testing.T ) {
@@ -161,6 +172,7 @@ func TestWebhook(t *testing.T) {
161172 opt := & bitbucket.WebhooksOptions {
162173 Owner : owner ,
163174 RepoSlug : repo ,
175+ Secret : "unsecureSecret" ,
164176 Description : fmt .Sprintf ("go-bb-test-%d" , i ),
165177 Url : fmt .Sprintf ("https://example.com/%d" , i ),
166178 Active : false ,
0 commit comments