github.com/mailgun/mailgun-go/v3@v3.6.4/limits_test.go (about)

     1  package mailgun_test
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	"github.com/facebookgo/ensure"
     8  	"github.com/mailgun/mailgun-go/v3"
     9  )
    10  
    11  func TestLimits(t *testing.T) {
    12  	mg := mailgun.NewMailgun(testDomain, testKey)
    13  	mg.SetAPIBase(server.URL())
    14  
    15  	ctx := context.Background()
    16  	limits, err := mg.GetTagLimits(ctx, testDomain)
    17  	ensure.Nil(t, err)
    18  
    19  	ensure.DeepEqual(t, limits.Limit, 50000)
    20  	ensure.DeepEqual(t, limits.Count, 5000)
    21  }