Sha256: fae96604c97fc54bf8534d5ffb83b7c9aa8b3a823f029467381c5f91472325c5
Contents?: true
Size: 751 Bytes
Versions: 8
Compression:
Stored size: 751 Bytes
Contents
# frozen_string_literal: true module NulogySSO RSpec.describe OriginRedirector do let(:mock_login_uri) { NulogySSO::sso_config.login_uri } describe "#authentication_redirect_uri" do it "appends the url escaped origin to the redirect uri" do previous_url = "https://example.com/path?foo=bar&specialParam%5Babc%5D=1" result = subject.authentication_redirect_uri(previous_url) expect(result).to eq("#{mock_login_uri}?origin=https%3A%2F%2Fexample.com%2Fpath%3Ffoo%3Dbar%26specialParam%255Babc%255D%3D1") end it "omits the origin when the previous uri is missing" do result = subject.authentication_redirect_uri(nil) expect(result).to eq(mock_login_uri) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems