Sha256: bf478b8f92f02177d3e26ee607523a07735d0a765ed8bf609b77fbb0e499d7b0

Contents?: true

Size: 808 Bytes

Versions: 11

Compression:

Stored size: 808 Bytes

Contents

require "spec_helper"

describe Brightbox::FirewallRule do

  describe "#create" do
    context "when policy exists" do
      before do
        policy_options = {
        }
        @policy = Brightbox::FirewallPolicy.create(policy_options)

        @rule_options = {
          :destination => "0.0.0.0/0",
          :destination_port => "1080",
          :protocol => "tcp",
          :firewall_policy_id => @policy.id
        }
      end

      it "creates the rule successfully", :vcr do
        @rule = Brightbox::FirewallRule.create(@rule_options)
        output = FauxIO.new do
          Brightbox.render_table([@rule], :vertical => true)
        end

        expect(output.stdout).to include(@rule.id)
      end

      after do
        @rule.destroy
        @policy.destroy
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
brightbox-cli-2.1.2 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-2.1.1 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-2.1.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-2.0.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.6.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.5.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.4.3 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.4.2 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.4.1 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.4.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.3.0 spec/unit/brightbox/firewall_rule/create_spec.rb