Sha256: 82edbac59a5943320f63f9cf95819b569387350a31582c595c32e58b5edc1dca

Contents?: true

Size: 1.03 KB

Versions: 1

Compression:

Stored size: 1.03 KB

Contents

require "spec_helper"

describe Brightbox::Server do

  describe "#show", vcr: true do
    context "when server exists" do
      before do
        options = {
          :image_id => "img-12345",
          :name => "medium servers",
          :zone_id => "",
          :user_data => nil,
          :flavor_id => "typ-12345"
        }
        @server = Brightbox::Server.create options
        @servers = Brightbox::DetailedServer.find_or_call([@server.id])
      end

      it "shows detailed attributes of a server" do
        output = FauxIO.new do
          Brightbox.render_table(@servers, :vertical => true)
        end
        expect(output.stdout).to include("private_ips:")
        expect(output.stdout).to include("ram:")
        expect(output.stdout).to include("disk:")
        expect(output.stdout).to include("hostname: #{@server.id}")
        expect(output.stdout).to include("ipv6_hostname: ipv6.#{@server.id}.gb1.brightbox.com")
        expect(output.stdout).to include("fqdn: #{@server.id}.gb1.brightbox.com")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
brightbox-cli-2.2.0 spec/unit/brightbox/server/find_or_call_spec.rb