@@ -2772,7 +2772,7 @@ var _ = Describe("Processor", Ordered, func() {
2772
2772
defer cancel ()
2773
2773
Expect (processor .config .asyncInit .WaitContext (ctx )).To (BeNil ())
2774
2774
2775
- Expect (processor .isDestinationAvailable (eventWithDeniedConsents , SourceIDOneTrustConsent )).To (BeTrue ())
2775
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsents , SourceIDOneTrustConsent , "" )).To (BeTrue ())
2776
2776
Expect (
2777
2777
len (processor .getConsentFilteredDestinations (
2778
2778
eventWithDeniedConsents ,
@@ -2783,7 +2783,7 @@ var _ = Describe("Processor", Ordered, func() {
2783
2783
)),
2784
2784
).To (Equal (3 )) // all except D1 and D3
2785
2785
2786
- Expect (processor .isDestinationAvailable (eventWithoutDeniedConsents , SourceIDOneTrustConsent )).To (BeTrue ())
2786
+ Expect (processor .isDestinationAvailable (eventWithoutDeniedConsents , SourceIDOneTrustConsent , "" )).To (BeTrue ())
2787
2787
Expect (
2788
2788
len (processor .getConsentFilteredDestinations (
2789
2789
eventWithoutDeniedConsents ,
@@ -2794,7 +2794,18 @@ var _ = Describe("Processor", Ordered, func() {
2794
2794
)),
2795
2795
).To (Equal (5 )) // all
2796
2796
2797
- Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDOneTrustConsent )).To (BeTrue ())
2797
+ Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDOneTrustConsent , "" )).To (BeTrue ())
2798
+ Expect (
2799
+ len (processor .getConsentFilteredDestinations (
2800
+ eventWithoutConsentManagementData ,
2801
+ processor .getEnabledDestinations (
2802
+ SourceIDOneTrustConsent ,
2803
+ "destination-definition-name-enabled" ,
2804
+ ),
2805
+ )),
2806
+ ).To (Equal (5 )) // all
2807
+
2808
+ Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDOneTrustConsent , "dest-id-1" )).To (BeTrue ())
2798
2809
Expect (
2799
2810
len (processor .getConsentFilteredDestinations (
2800
2811
eventWithoutConsentManagementData ,
@@ -2853,7 +2864,7 @@ var _ = Describe("Processor", Ordered, func() {
2853
2864
),
2854
2865
)
2855
2866
Expect (len (filteredDestinations )).To (Equal (4 )) // all except dest-id-5 since both purpose1 and purpose2 are denied
2856
- Expect (processor .isDestinationAvailable (event , SourceIDKetchConsent )).To (BeTrue ())
2867
+ Expect (processor .isDestinationAvailable (event , SourceIDKetchConsent , "" )).To (BeTrue ())
2857
2868
})
2858
2869
2859
2870
It ("should filter based on generic consent management preferences" , func () {
@@ -3010,7 +3021,7 @@ var _ = Describe("Processor", Ordered, func() {
3010
3021
defer cancel ()
3011
3022
Expect (processor .config .asyncInit .WaitContext (ctx )).To (BeNil ())
3012
3023
3013
- Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDGCM )).To (BeTrue ())
3024
+ Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDGCM , "" )).To (BeTrue ())
3014
3025
Expect (
3015
3026
len (processor .getConsentFilteredDestinations (
3016
3027
eventWithoutConsentManagementData ,
@@ -3021,7 +3032,7 @@ var _ = Describe("Processor", Ordered, func() {
3021
3032
)),
3022
3033
).To (Equal (9 )) // all
3023
3034
3024
- Expect (processor .isDestinationAvailable (eventWithoutDeniedConsentsGCM , SourceIDGCM )).To (BeTrue ())
3035
+ Expect (processor .isDestinationAvailable (eventWithoutDeniedConsentsGCM , SourceIDGCM , "" )).To (BeTrue ())
3025
3036
Expect (
3026
3037
len (processor .getConsentFilteredDestinations (
3027
3038
eventWithoutDeniedConsentsGCM ,
@@ -3032,7 +3043,7 @@ var _ = Describe("Processor", Ordered, func() {
3032
3043
)),
3033
3044
).To (Equal (9 )) // all
3034
3045
3035
- Expect (processor .isDestinationAvailable (eventWithCustomConsentsGCM , SourceIDGCM )).To (BeTrue ())
3046
+ Expect (processor .isDestinationAvailable (eventWithCustomConsentsGCM , SourceIDGCM , "" )).To (BeTrue ())
3036
3047
Expect (
3037
3048
len (processor .getConsentFilteredDestinations (
3038
3049
eventWithCustomConsentsGCM ,
@@ -3043,7 +3054,7 @@ var _ = Describe("Processor", Ordered, func() {
3043
3054
)),
3044
3055
).To (Equal (8 )) // all except D13
3045
3056
3046
- Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCM , SourceIDGCM )).To (BeTrue ())
3057
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCM , SourceIDGCM , "" )).To (BeTrue ())
3047
3058
Expect (
3048
3059
len (processor .getConsentFilteredDestinations (
3049
3060
eventWithDeniedConsentsGCM ,
@@ -3054,7 +3065,7 @@ var _ = Describe("Processor", Ordered, func() {
3054
3065
)),
3055
3066
).To (Equal (7 )) // all except D6 and D7
3056
3067
3057
- Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDGCM )).To (BeTrue ())
3068
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDGCM , "" )).To (BeTrue ())
3058
3069
Expect (
3059
3070
len (processor .getConsentFilteredDestinations (
3060
3071
eventWithDeniedConsentsGCMKetch ,
@@ -3064,6 +3075,15 @@ var _ = Describe("Processor", Ordered, func() {
3064
3075
),
3065
3076
)),
3066
3077
).To (Equal (8 )) // all except D7
3078
+
3079
+ // some unknown destination ID is passed destination will be unavailable
3080
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDGCM , "unknown-destination" )).To (BeFalse ())
3081
+
3082
+ // known destination ID is passed and destination is enabled
3083
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDTransient , DestinationIDEnabledA )).To (BeTrue ())
3084
+
3085
+ // know destination ID is passed and destination is not enabled
3086
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDTransient , DestinationIDDisabled )).To (BeFalse ())
3067
3087
})
3068
3088
})
3069
3089
0 commit comments