Sha256: 44776941c7c3ffec41bc6209fa48bc641f38795783c78d326346c8d07f19281f

Contents?: true

Size: 772 Bytes

Versions: 3

Compression:

Stored size: 772 Bytes

Contents

require "spec_helper"

describe "brightbox sql snapshots" do
  describe "list" do
    let(:output) { FauxIO.new { Brightbox.run(argv) } }
    let(:stdout) { output.stdout }
    let(:stderr) { output.stderr }

    before do
      config = config_from_contents(USER_APP_CONFIG_CONTENTS)

      # Setup in the VCR recordings
      cache_access_token(config, "f83da712e6299cda953513ec07f7a754f747d727")
    end

    context "when resources are available", vcr: true do
      let(:argv) { %w[sql snapshots list] }

      it "does not output to stderr" do
        expect(stderr).to be_empty unless ENV["DEBUG"]
      end

      it "outputs table details to stdout" do
        expect(stdout).to_not be_empty
        expect(stdout).to match(/dbi-\d+/)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0 spec/commands/sql/snapshots/list_spec.rb
brightbox-cli-5.0.0.rc2 spec/commands/sql/snapshots/list_spec.rb
brightbox-cli-5.0.0.rc1 spec/commands/sql/snapshots/list_spec.rb