(t *testing.T)
| 342 | } |
| 343 | |
| 344 | func 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 | |
| 355 | func newTestPublisher(opts ...PublisherOpt) *Publisher { |
| 356 | return NewPublisher("exchange.name", "routing.key", opts...) |
nothing calls this directly
no test coverage detected