Sha256: 6fe1ae961e2bc3486623c459ed104144c21ec66263c96ca8c075b9e4ba3fad70

Contents?: true

Size: 731 Bytes

Versions: 5

Compression:

Stored size: 731 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

module Archangel
  RSpec.describe FlashHelper, type: :helper do
    context "#flash_class_for(obj)" do
      it "returns success class" do
        expect(helper.flash_class_for("success")).to eq("success")
      end

      it "returns error class" do
        expect(helper.flash_class_for("error")).to eq("danger")
      end

      it "returns alert class" do
        expect(helper.flash_class_for("alert")).to eq("warning")
      end

      it "returns notice class" do
        expect(helper.flash_class_for("notice")).to eq("info")
      end

      it "returns unknown class" do
        expect(helper.flash_class_for("unknown")).to eq("unknown")
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
archangel-0.0.6 spec/helpers/archangel/flash_helper_spec.rb
archangel-0.0.5 spec/helpers/archangel/flash_helper_spec.rb
archangel-0.0.4 spec/helpers/archangel/flash_helper_spec.rb
archangel-0.0.3 spec/helpers/archangel/flash_helper_spec.rb
archangel-0.0.2 spec/helpers/archangel/flash_helper_spec.rb