Sha256: 96dd16c7ce4dfb876d9a8e801235d625454e897452264f60e0bd1ccf3529f67d
Contents?: true
Size: 964 Bytes
Versions: 14
Compression:
Stored size: 964 Bytes
Contents
# frozen_string_literal: true require 'test_helper' class DeviseJwtAuth::UrlTest < ActiveSupport::TestCase describe 'DeviseJwtAuth::Url#generate' do test 'URI fragment should appear at the end of URL with repeat of query params' do params = { client_id: 123 } url = 'http://example.com#fragment' assert_equal DeviseJwtAuth::Url.send(:generate, url, params), 'http://example.com?client_id=123#fragment?client_id=123' end describe 'with existing query params' do test 'should preserve existing query params' do url = 'http://example.com?a=1' assert_equal DeviseJwtAuth::Url.send(:generate, url), 'http://example.com?a=1' end test 'should marge existing query params with new ones' do params = { client_id: 123 } url = 'http://example.com?a=1' assert_equal DeviseJwtAuth::Url.send(:generate, url, params), 'http://example.com?a=1&client_id=123' end end end end
Version data entries
14 entries across 14 versions & 3 rubygems