Sha256: a9ad60c7fb7d14e9d0d20dd99fbb32cc23d279a31a7e52ae802006eab847fb5c
Contents?: true
Size: 805 Bytes
Versions: 9
Compression:
Stored size: 805 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe Lcms::Engine::PathHelper do describe '#dynamic_path' do let(:args) { { query: 'test', filter: '1' } } subject { helper.dynamic_path(:root_path, args) } context 'with host redirect' do it 'builds correct path' do expect(subject).to eq "/admin?#{args.to_param}" end end context 'with engine redirect' do let(:settings) do settings = Lcms::Engine::Admin::AdminController.settings settings[:redirect].delete(:host) settings end before { allow(Lcms::Engine::Admin::AdminController).to receive(:settings).and_return(settings) } it 'builds correct path' do expect(subject).to eq "/lcms-engine/admin?#{args.to_param}" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems