Sha256: 4bcb9d0f695f5ce8bf078335e283329384803daef44395d9c2be5759590ff9cf

Contents?: true

Size: 794 Bytes

Versions: 1

Compression:

Stored size: 794 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"

module Archangel
  module Liquid
    module Tags
      RSpec.describe ThemeStylesheetTag, type: :liquid_tag,
                                         disable: :verify_partial_doubles do
        before { create(:site) }

        let(:context) { ::Liquid::Context.new({}, {}, view: view) }

        it "renders stylesheet tag for theme" do
          allow(view).to receive(:current_theme).and_return("default")

          result = ::Liquid::Template.parse("{% theme_stylesheet %}")
                                     .render(context)
          expected = '<link rel="stylesheet" media="screen" ' \
                     'href="/assets/default/frontend'

          expect(result).to include(expected)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
archangel-0.0.2 spec/lib/archangel/liquid/tags/theme_stylesheet_tag_spec.rb