Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ci_status_helper_spec.rb « helpers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 637b02d938877df3b8d3df37b5d5d3a107522afe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'spec_helper'

describe CiStatusHelper do
  include IconsHelper

  let(:success_commit) { double("Ci::Pipeline", status: 'success') }
  let(:failed_commit) { double("Ci::Pipeline", status: 'failed') }

  describe 'ci_icon_for_status' do
    it 'renders to correct svg on success' do
      expect(helper).to receive(:render).with('shared/icons/icon_status_success.svg', anything)
      helper.ci_icon_for_status(success_commit.status)
    end
    it 'renders the correct svg on failure' do
      expect(helper).to receive(:render).with('shared/icons/icon_status_failed.svg', anything)
      helper.ci_icon_for_status(failed_commit.status)
    end
  end
end