Sha256: a03dc942c9e0b9aa730bae4357011c102d93372433976621c799065366053587

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

require "integration/test_helper"

describe "Deleting a Topic" do

  after do
    ServiceBusTopicNameHelper.clean
  end

  it "should return false if the topic cannot be deleted" do
    topic = Azure::ServiceBus::Topics::Topic.new(ServiceBusTopicNameHelper.name)
    response = topic.delete

    response.must_equal false
    refute topic.valid?
    refute topic.frozen?
  end

  it "should return true if the topic can be deleted" do
    topic = Azure::ServiceBus::Topics.create(ServiceBusTopicNameHelper.name)
    response = topic.delete

    response.must_equal true
    assert topic.frozen?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure-0.1.1 test/integration/service_bus/topics/delete_topic_test.rb
azure-0.1.0 test/integration/service_bus/topics/delete_topic_test.rb