Sha256: 51341ac60639f02b4247ef74b9cbcfbb3149041b42d84ff74ebd279877bd11c8

Contents?: true

Size: 801 Bytes

Versions: 66

Compression:

Stored size: 801 Bytes

Contents

require 'spec_helper'

describe IconsHelper 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

66 entries across 66 versions & 1 rubygems

Version Path
mumuki-laboratory-6.7.7 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.6 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.5 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.4 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.3 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.2 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.1 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.7.0 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.6.1 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.6.0 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.5.1 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.5.0 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.4.2 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.4.1 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.4.0 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.2.0 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.1.5 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.0.4 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.1.4 spec/helpers/icons_helper_spec.rb
mumuki-laboratory-6.1.3 spec/helpers/icons_helper_spec.rb