Sha256: 5143d3cdf1dceb2e910e2babb2c4fd1a8047ba2586c9ef5bd8b1f79b11e875ab
Contents?: true
Size: 1.23 KB
Versions: 28
Compression:
Stored size: 1.23 KB
Contents
require "spec_helper" describe Brightbox::FirewallRule do before do config_from_contents(API_CLIENT_CONFIG_CONTENTS) end describe "#find", vcr: true do context "when rule 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 } @rule = Brightbox::FirewallRule.create rule_options end it "can display the result" do expect do @rule = Brightbox::FirewallRule.find(@rule.id) end.to_not raise_error display_options = { :fields => [ :id, :protocol, :source, :sport, :destination, :dport, :icmp_type, :firewall_policy ], :vertical => true } output = FauxIO.new do Brightbox.render_table([@rule], display_options) end expect(output.stdout).to include("firewall_policy: #{@policy.id}") expect(output.stdout).to include("dport: 1080") end end end end
Version data entries
28 entries across 28 versions & 1 rubygems