diff options
Diffstat (limited to 'spec/helpers/ci/jobs_helper_spec.rb')
-rw-r--r-- | spec/helpers/ci/jobs_helper_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/helpers/ci/jobs_helper_spec.rb b/spec/helpers/ci/jobs_helper_spec.rb new file mode 100644 index 00000000000..e5ef362e91b --- /dev/null +++ b/spec/helpers/ci/jobs_helper_spec.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Ci::JobsHelper do + describe 'jobs data' do + let(:project) { create(:project, :repository) } + let(:bridge) { create(:ci_bridge, status: :pending) } + + subject(:bridge_data) { helper.bridge_data(bridge) } + + before do + allow(helper) + .to receive(:image_path) + .and_return('/path/to/illustration') + end + + it 'returns bridge data' do + expect(bridge_data).to eq({ + "build_name" => bridge.name, + "empty-state-illustration-path" => '/path/to/illustration' + }) + end + end +end |