summaryrefslogtreecommitdiff
path: root/spec/unit/cli/index/update_spec.rb
blob: 700fb077368ea26effb1c355b476737d788514ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

RSpec.describe Spandx::Cli::Commands::Index::Update do
  subject { described_class.new(options) }

  let(:options) { {} }

  describe '#execute' do
    let(:output) { StringIO.new }

    it 'executes `index update` command successfully' do
      subject.execute(output: output)
      expected = <<~OUTPUT
        Updating https://github.com/mokhan/spandx-rubygems.git...
        Updating https://github.com/spdx/license-list-data.git...
        OK
      OUTPUT

      expect(output.string).to eq(expected)
    end
  end
end