Sha256: 5109dc31a066fb32197c36c3226f8925c07a9d4a6c22f32f033e508185bb5064

Contents?: true

Size: 832 Bytes

Versions: 14

Compression:

Stored size: 832 Bytes

Contents

require 'spec_helper'

describe IconsHelper, organization_workspace: :test do
  helper IconsHelper
  helper FontAwesome::Rails::IconHelper

  describe '#language_icon' do
    let(:haskell) { create(:language, name: 'Haskell') }
    let(:haskell_img_tag) { '<span class="fa da da-haskell lang-icon" alt="Haskell" />' }
    it { expect(language_icon(haskell)).to include haskell_img_tag }
  end

  describe '#status_icon' do
    let(:passed_submission) { create(:assignment, status: :passed, expectation_results: []) }
    let(:failed_submission) { create(:assignment, status: :failed) }

    it { expect(status_icon(passed_submission)).to eq '<i class="fa fa-check-circle text-success status-icon"></i>' }
    it { expect(status_icon(failed_submission)).to eq '<i class="fa fa-times-circle text-danger status-icon"></i>' }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mumuki-laboratory-7.1.0 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.12 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.11 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.10 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.9 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.8 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.7 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.6 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.5 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.4 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.3 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.2 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.1 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-7.0.0 spec/helpers/icons_helper_spec.rb