Sha256: 48115710a45a073ebdf7cc95d5c74081388fa1c7cafe871ee04d83ec9d476328

Contents?: true

Size: 819 Bytes

Versions: 15

Compression:

Stored size: 819 Bytes

Contents

require 'rails_helper'

module MnoEnterprise
  describe ApplicationController, type: :controller do
    describe '#add_param_to_fragment' do
      let(:controller) { MnoEnterprise::ApplicationController.new }

      it { expect(subject.send(:add_param_to_fragment, '/#/platform/accounts', 'foo', 'bar')).to eq('/#/platform/accounts?foo=bar') }
      it { expect(subject.send(:add_param_to_fragment, '/', 'foo', 'bar')).to eq('/#?foo=bar') }
      it { expect(subject.send(:add_param_to_fragment, '/#/platform/dashboard/he/43?en=690', 'foo', 'bar')).to eq('/#/platform/dashboard/he/43?en=690&foo=bar') }
      it { expect(subject.send(:add_param_to_fragment, '/#/platform/dashboard/he/43?en=690', 'foo', [{msg: 'yolo'}])).to eq('/#/platform/dashboard/he/43?en=690&foo=%7B%3Amsg%3D%3E%22yolo%22%7D') }
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mno-enterprise-core-3.0.7 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.9 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-3.0.6 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.8 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-3.0.5 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.7 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.6 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.5 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-3.0.4 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.4 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-3.1.0 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-3.0.3 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.3 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-3.0.2 spec/controllers/mno_enterprise/application_controller_spec.rb
mno-enterprise-core-2.0.2 spec/controllers/mno_enterprise/application_controller_spec.rb