Sha256: c63d99df54dbdf9ab83771989aabd844617d1a45272032a0120fe8f79deec29e

Contents?: true

Size: 517 Bytes

Versions: 43

Compression:

Stored size: 517 Bytes

Contents

require 'spec_helper'

describe Qa::Authorities::AssignFast::SpaceFixEncoder do
  let(:encoder) { described_class.new }

  it 'encodes spaces as %20 instead of +' do
    input = { "query" => "word ling", "queryIndex" => "suggestall", "queryReturn" => "suggestall,idroot,auth,type", "suggest" => "autoSubject", "rows" => "20" }
    expected = "query=word%20ling&queryIndex=suggestall&queryReturn=suggestall%2Cidroot%2Cauth%2Ctype&rows=20&suggest=autoSubject"
    expect(encoder.encode(input)).to eq expected
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
qa-5.13.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.12.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.11.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.10.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.9.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.8.1 spec/lib/authorities/space_fix_encoder.rb
qa-5.8.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.7.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.6.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.5.2 spec/lib/authorities/space_fix_encoder.rb
qa-4.3.0 spec/lib/authorities/space_fix_encoder.rb
qa-3.1.0 spec/lib/authorities/space_fix_encoder.rb
qa-2.3.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.5.1 spec/lib/authorities/space_fix_encoder.rb
qa-5.5.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.4.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.3.1 spec/lib/authorities/space_fix_encoder.rb
qa-5.3.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.2.0 spec/lib/authorities/space_fix_encoder.rb
qa-5.1.0 spec/lib/authorities/space_fix_encoder.rb