@@ -128,6 +128,32 @@ func TestNotificationConfigurationCreate(t *testing.T) {
128
128
assert .Equal (t , err , ErrRequiredURL )
129
129
})
130
130
131
+ t .Run ("without a required value URL when destination type is slack" , func (t * testing.T ) {
132
+ options := NotificationConfigurationCreateOptions {
133
+ DestinationType : NotificationDestination (NotificationDestinationTypeSlack ),
134
+ Enabled : Bool (false ),
135
+ Name : String (randomString (t )),
136
+ Triggers : []NotificationTriggerType {NotificationTriggerCreated },
137
+ }
138
+
139
+ nc , err := client .NotificationConfigurations .Create (ctx , wTest .ID , options )
140
+ assert .Nil (t , nc )
141
+ assert .Equal (t , err , ErrRequiredURL )
142
+ })
143
+
144
+ t .Run ("without a required value URL when destination type is MS Teams" , func (t * testing.T ) {
145
+ options := NotificationConfigurationCreateOptions {
146
+ DestinationType : NotificationDestination (NotificationDestinationTypeMicrosoftTeams ),
147
+ Enabled : Bool (false ),
148
+ Name : String (randomString (t )),
149
+ Triggers : []NotificationTriggerType {NotificationTriggerCreated },
150
+ }
151
+
152
+ nc , err := client .NotificationConfigurations .Create (ctx , wTest .ID , options )
153
+ assert .Nil (t , nc )
154
+ assert .Equal (t , err , ErrRequiredURL )
155
+ })
156
+
131
157
t .Run ("without a valid workspace" , func (t * testing.T ) {
132
158
nc , err := client .NotificationConfigurations .Create (ctx , badIdentifier , NotificationConfigurationCreateOptions {})
133
159
assert .Nil (t , nc )
0 commit comments