Sha256: d5df75af9051c6e3cbeaca41ad93b54ecd803878b60eb00a270a042072804816

Contents?: true

Size: 893 Bytes

Versions: 523

Compression:

Stored size: 893 Bytes

Contents

require "spec_helper"

RSpec.describe Files::URI do
  describe "normalized_path" do
    it { expect(described_class.normalized_path("path/[[strange stuff]]#yes.text")).to eq("path/%5B%5Bstrange%20stuff%5D%5D%23yes.text") }
    it { expect(Addressable::URI.unencode_component(described_class.normalized_path("[[strange stuff]]#yes.text"))).to eq("[[strange stuff]]#yes.text") }

    it { expect(described_class.normalized_path("folder/AdÇe")).to eq("folder/AdC%CC%A7e") }
    it { expect(Addressable::URI.unencode_component(described_class.normalized_path("AdÇe"))).to eq("AdÇe") }

    it { expect(described_class.normalized_path("lorem%20ipsum.txt")).to eq("lorem%2520ipsum.txt") }
    it { expect(described_class.normalized_path("lorem%ipsum.txt")).to eq("lorem%25ipsum.txt") }
    it { expect(described_class.normalized_path("lorem ipsum.txt")).to eq("lorem%20ipsum.txt") }
  end
end

Version data entries

523 entries across 523 versions & 1 rubygems

Version Path
files.com-1.1.180 spec/uri_spec.rb
files.com-1.1.179 spec/uri_spec.rb
files.com-1.1.178 spec/uri_spec.rb
files.com-1.1.177 spec/uri_spec.rb
files.com-1.1.176 spec/uri_spec.rb
files.com-1.1.175 spec/uri_spec.rb
files.com-1.1.174 spec/uri_spec.rb
files.com-1.1.173 spec/uri_spec.rb
files.com-1.1.172 spec/uri_spec.rb
files.com-1.1.171 spec/uri_spec.rb
files.com-1.1.170 spec/uri_spec.rb
files.com-1.1.169 spec/uri_spec.rb
files.com-1.1.168 spec/uri_spec.rb
files.com-1.1.167 spec/uri_spec.rb
files.com-1.1.166 spec/uri_spec.rb
files.com-1.1.165 spec/uri_spec.rb
files.com-1.1.164 spec/uri_spec.rb
files.com-1.1.163 spec/uri_spec.rb
files.com-1.1.162 spec/uri_spec.rb
files.com-1.1.161 spec/uri_spec.rb