Sha256: 4ed4ec0207a128d569ff884d3103e1ab9eabb9d68bc4eb57c2b0c573080adb6e
Contents?: true
Size: 996 Bytes
Versions: 8
Compression:
Stored size: 996 Bytes
Contents
require 'spec_helper' require 'f5/cli/application' describe F5::Cli::Pool do before do allow(subject).to receive(:client).and_return(client) end let(:client) { double } context "list" do let(:output) { capture(:stdout) { subject.list } } context "no pools" do it "indicates there are no pools" do allow(client).to receive_message_chain("LocalLB", "Pool", "get_list") { { item: nil } } expect(output).to include("No pools found") end end context "one pool" do it "lists the pools" do allow(client).to receive_message_chain("LocalLB", "Pool", "get_list") { { item: "/Common/foobar" } } expect(output).to eq("/Common/foobar\n") end end context "two pools" do it "lists the pools" do allow(client).to receive_message_chain("LocalLB", "Pool", "get_list") { { item: [ "/Common/one", "/Common/two" ] } } expect(output).to eq("/Common/one\n/Common/two\n") end end end end
Version data entries
8 entries across 8 versions & 1 rubygems