Sha256: 79e359770e49dec120eec0e85fa732e62d9ba2b57c7cecbcc696c6ece57856f2

Contents?: true

Size: 823 Bytes

Versions: 3

Compression:

Stored size: 823 Bytes

Contents

require "spec_helper"

describe Brightbox::FirewallRule do

  describe "#create", :broken_1_8 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

3 entries across 3 versions & 1 rubygems

Version Path
brightbox-cli-1.1.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.0.0 spec/unit/brightbox/firewall_rule/create_spec.rb
brightbox-cli-1.0.0.rc2 spec/unit/brightbox/firewall_rule/create_spec.rb