debian-mirror-gitlab/spec/lib/gitlab/ci/status/build/preparing_spec.rb

34 lines
743 B
Ruby
Raw Normal View History

2019-07-07 11:18:12 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Ci::Status::Build::Preparing do
2019-07-07 11:18:12 +05:30
subject do
described_class.new(double('subject'))
end
describe '#illustration' do
it { expect(subject.illustration).to include(:image, :size, :title, :content) }
end
describe '.matches?' do
subject { described_class.matches?(build, nil) }
context 'when build is preparing' do
let(:build) { create(:ci_build, :preparing) }
it 'is a correct match' do
expect(subject).to be true
end
end
context 'when build is not preparing' do
let(:build) { create(:ci_build, :success) }
it 'does not match' do
expect(subject).to be false
end
end
end
end