debian-mirror-gitlab/spec/helpers/ci_status_helper_spec.rb

20 lines
664 B
Ruby
Raw Normal View History

2015-10-24 18:46:33 +05:30
require 'spec_helper'
describe CiStatusHelper do
include IconsHelper
let(:success_commit) { double("Ci::Pipeline", status: 'success') }
let(:failed_commit) { double("Ci::Pipeline", status: 'failed') }
2015-10-24 18:46:33 +05:30
2016-06-02 11:05:42 +05:30
describe 'ci_icon_for_status' do
2016-08-24 12:49:21 +05:30
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
2015-10-24 18:46:33 +05:30
end
end