diff --git a/tests/auto/qamqpqueue/tst_qamqpqueue.cpp b/tests/auto/qamqpqueue/tst_qamqpqueue.cpp index 0ab5add..8fc77fd 100644 --- a/tests/auto/qamqpqueue/tst_qamqpqueue.cpp +++ b/tests/auto/qamqpqueue/tst_qamqpqueue.cpp @@ -21,6 +21,7 @@ private Q_SLOTS: void remove(); void removeIfUnused(); + void unbind(); private: // disabled void removeIfEmpty(); @@ -131,5 +132,19 @@ void tst_QAMQPQueue::removeIfEmpty() QVERIFY(!queue->errorString().isEmpty()); } +void tst_QAMQPQueue::unbind() +{ + Queue *queue = client->createQueue("test-unbind"); + queue->declare(); + QVERIFY(waitForSignal(queue, SIGNAL(declared()))); + queue->consume(); // required because AutoDelete will not delete if + // there was never a consumer + + queue->bind("amq.topic", "routingKey"); + QVERIFY(waitForSignal(queue, SIGNAL(bound()))); + queue->unbind("amq.topic", "routingKey"); + QVERIFY(waitForSignal(queue, SIGNAL(unbound()))); +} + QTEST_MAIN(tst_QAMQPQueue) #include "tst_qamqpqueue.moc"