@@ -2736,7 +2736,7 @@ var _ = Describe("Processor", Ordered, func() {
2736
2736
defer cancel ()
2737
2737
Expect (processor .config .asyncInit .WaitContext (ctx )).To (BeNil ())
2738
2738
2739
- Expect (processor .isDestinationAvailable (eventWithDeniedConsents , SourceIDOneTrustConsent )).To (BeTrue ())
2739
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsents , SourceIDOneTrustConsent , "" )).To (BeTrue ())
2740
2740
Expect (
2741
2741
len (processor .getConsentFilteredDestinations (
2742
2742
eventWithDeniedConsents ,
@@ -2747,7 +2747,7 @@ var _ = Describe("Processor", Ordered, func() {
2747
2747
)),
2748
2748
).To (Equal (3 )) // all except D1 and D3
2749
2749
2750
- Expect (processor .isDestinationAvailable (eventWithoutDeniedConsents , SourceIDOneTrustConsent )).To (BeTrue ())
2750
+ Expect (processor .isDestinationAvailable (eventWithoutDeniedConsents , SourceIDOneTrustConsent , "" )).To (BeTrue ())
2751
2751
Expect (
2752
2752
len (processor .getConsentFilteredDestinations (
2753
2753
eventWithoutDeniedConsents ,
@@ -2758,7 +2758,18 @@ var _ = Describe("Processor", Ordered, func() {
2758
2758
)),
2759
2759
).To (Equal (5 )) // all
2760
2760
2761
- Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDOneTrustConsent )).To (BeTrue ())
2761
+ Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDOneTrustConsent , "" )).To (BeTrue ())
2762
+ Expect (
2763
+ len (processor .getConsentFilteredDestinations (
2764
+ eventWithoutConsentManagementData ,
2765
+ processor .getEnabledDestinations (
2766
+ SourceIDOneTrustConsent ,
2767
+ "destination-definition-name-enabled" ,
2768
+ ),
2769
+ )),
2770
+ ).To (Equal (5 )) // all
2771
+
2772
+ Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDOneTrustConsent , "dest-id-1" )).To (BeTrue ())
2762
2773
Expect (
2763
2774
len (processor .getConsentFilteredDestinations (
2764
2775
eventWithoutConsentManagementData ,
@@ -2817,7 +2828,7 @@ var _ = Describe("Processor", Ordered, func() {
2817
2828
),
2818
2829
)
2819
2830
Expect (len (filteredDestinations )).To (Equal (4 )) // all except dest-id-5 since both purpose1 and purpose2 are denied
2820
- Expect (processor .isDestinationAvailable (event , SourceIDKetchConsent )).To (BeTrue ())
2831
+ Expect (processor .isDestinationAvailable (event , SourceIDKetchConsent , "" )).To (BeTrue ())
2821
2832
})
2822
2833
2823
2834
It ("should filter based on generic consent management preferences" , func () {
@@ -2974,7 +2985,7 @@ var _ = Describe("Processor", Ordered, func() {
2974
2985
defer cancel ()
2975
2986
Expect (processor .config .asyncInit .WaitContext (ctx )).To (BeNil ())
2976
2987
2977
- Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDGCM )).To (BeTrue ())
2988
+ Expect (processor .isDestinationAvailable (eventWithoutConsentManagementData , SourceIDGCM , "" )).To (BeTrue ())
2978
2989
Expect (
2979
2990
len (processor .getConsentFilteredDestinations (
2980
2991
eventWithoutConsentManagementData ,
@@ -2985,7 +2996,7 @@ var _ = Describe("Processor", Ordered, func() {
2985
2996
)),
2986
2997
).To (Equal (9 )) // all
2987
2998
2988
- Expect (processor .isDestinationAvailable (eventWithoutDeniedConsentsGCM , SourceIDGCM )).To (BeTrue ())
2999
+ Expect (processor .isDestinationAvailable (eventWithoutDeniedConsentsGCM , SourceIDGCM , "" )).To (BeTrue ())
2989
3000
Expect (
2990
3001
len (processor .getConsentFilteredDestinations (
2991
3002
eventWithoutDeniedConsentsGCM ,
@@ -2996,7 +3007,7 @@ var _ = Describe("Processor", Ordered, func() {
2996
3007
)),
2997
3008
).To (Equal (9 )) // all
2998
3009
2999
- Expect (processor .isDestinationAvailable (eventWithCustomConsentsGCM , SourceIDGCM )).To (BeTrue ())
3010
+ Expect (processor .isDestinationAvailable (eventWithCustomConsentsGCM , SourceIDGCM , "" )).To (BeTrue ())
3000
3011
Expect (
3001
3012
len (processor .getConsentFilteredDestinations (
3002
3013
eventWithCustomConsentsGCM ,
@@ -3007,7 +3018,7 @@ var _ = Describe("Processor", Ordered, func() {
3007
3018
)),
3008
3019
).To (Equal (8 )) // all except D13
3009
3020
3010
- Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCM , SourceIDGCM )).To (BeTrue ())
3021
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCM , SourceIDGCM , "" )).To (BeTrue ())
3011
3022
Expect (
3012
3023
len (processor .getConsentFilteredDestinations (
3013
3024
eventWithDeniedConsentsGCM ,
@@ -3018,7 +3029,7 @@ var _ = Describe("Processor", Ordered, func() {
3018
3029
)),
3019
3030
).To (Equal (7 )) // all except D6 and D7
3020
3031
3021
- Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDGCM )).To (BeTrue ())
3032
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDGCM , "" )).To (BeTrue ())
3022
3033
Expect (
3023
3034
len (processor .getConsentFilteredDestinations (
3024
3035
eventWithDeniedConsentsGCMKetch ,
@@ -3028,6 +3039,15 @@ var _ = Describe("Processor", Ordered, func() {
3028
3039
),
3029
3040
)),
3030
3041
).To (Equal (8 )) // all except D7
3042
+
3043
+ // some unknown destination ID is passed destination will be unavailable
3044
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDGCM , "unknown-destination" )).To (BeFalse ())
3045
+
3046
+ // known destination ID is passed and destination is enabled
3047
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDTransient , DestinationIDEnabledA )).To (BeTrue ())
3048
+
3049
+ // know destination ID is passed and destination is not enabled
3050
+ Expect (processor .isDestinationAvailable (eventWithDeniedConsentsGCMKetch , SourceIDTransient , DestinationIDDisabled )).To (BeFalse ())
3031
3051
})
3032
3052
})
3033
3053
0 commit comments