Skip to content

Commit

Permalink
Removed test with not applicable scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-stanchev committed Nov 11, 2022
1 parent 735b77a commit fcf7b8c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dispatch/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var annNotif = NotificationModel{
ID: "http://www.ft.com/thing/7998974a-1e97-11e6-b286-cddde55ca122",
Type: "http://www.ft.com/thing/ThingChangeType/ANNOTATIONS_UPDATE",
PublishReference: "tid_test3",
SubscriptionType: "",
SubscriptionType: "Annotations",
}

var e2eTestNotification = NotificationModel{
Expand Down Expand Up @@ -462,35 +462,35 @@ func TestMatchesSubType(t *testing.T) {
res: true,
},
{
name: "test if subscriber is subscribed only for annotations and notification is of type DELETE and its content type cannot be resolved - we should NOT match it",
name: "test if subscriber is not subscribed for annotations and notification is of type DELETE and its content type cannot be resolved - we should match it",
n: NotificationModel{
SubscriptionType: "",
Type: ContentDeleteType,
},
s: &StandardSubscriber{
acceptedTypes: []string{AnnotationsType},
acceptedTypes: []string{ArticleContentType},
},
res: false,
res: true,
},
{
name: "test if subscriber is not subscribed for annotations and notification is of type DELETE and its content type cannot be resolved - we should match it",
name: "test if subscriber is subscribed for annotations and notification is of type DELETE and its content type cannot be resolved - we should match it",
n: NotificationModel{
SubscriptionType: "",
Type: ContentDeleteType,
},
s: &StandardSubscriber{
acceptedTypes: []string{ArticleContentType},
acceptedTypes: []string{AnnotationsType},
},
res: true,
},
{
name: "test if subscriber is subscribed for annotations and another content type AND notification is of type DELETE and its content type cannot be resolved - we should match it",
name: "test if subscriber is subscribed for annotations and notification is of type DELETE and its content type can be resolved - we should match it",
n: NotificationModel{
SubscriptionType: "",
SubscriptionType: AnnotationsType,
Type: ContentDeleteType,
},
s: &StandardSubscriber{
acceptedTypes: []string{AnnotationsType, ArticleContentType},
acceptedTypes: []string{AnnotationsType},
},
res: true,
},
Expand Down

0 comments on commit fcf7b8c

Please sign in to comment.