MCPcopy Create free account
hub / github.com/assembla/cony / TestPublishingTemplate

Function TestPublishingTemplate

publisher_test.go:344–353  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

342}
343
344func TestPublishingTemplate(t *testing.T) {
345 p := newTestPublisher()
346 pub := amqp.Publishing{AppId: "ololoapp"}
347
348 PublishingTemplate(pub)(p)
349
350 if p.tmpl.AppId != "ololoapp" {
351 t.Error("PublishingTemplate() should update template")
352 }
353}
354
355func newTestPublisher(opts ...PublisherOpt) *Publisher {
356 return NewPublisher("exchange.name", "routing.key", opts...)

Callers

nothing calls this directly

Calls 2

newTestPublisherFunction · 0.85
PublishingTemplateFunction · 0.85

Tested by

no test coverage detected