github.com/prebid/prebid-server/v2@v2.18.0/privacy/policyenforcer_test.go (about)

     1  package privacy
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestNilEnforcerCanEnforce(t *testing.T) {
    10  	nilEnforcer := &NilPolicyEnforcer{}
    11  	assert.False(t, nilEnforcer.CanEnforce())
    12  }
    13  
    14  func TestNilEnforcerShouldEnforce(t *testing.T) {
    15  	nilEnforcer := &NilPolicyEnforcer{}
    16  	assert.False(t, nilEnforcer.ShouldEnforce(""))
    17  	assert.False(t, nilEnforcer.ShouldEnforce("anyBidder"))
    18  }