Sha256: 99cebca792c8a848eb6838eb43f0c2700958c379afe515acbd8725c8c47d80d7
Contents?: true
Size: 628 Bytes
Versions: 1
Compression:
Stored size: 628 Bytes
Contents
require 'spec/spec_helper' describe "esi query string variable lookups" do it "should lookup a query string variable" do vars = {'id' => '1'} builder = Rack::Builder.new do use EsiForRack, {'/file/1' => 'resource'} run proc { |env| data = IO.read('spec/http_integration/fixtures/query_string/1.html') [200, {'Content-type' => 'text/html', 'Content-length' => data.size.to_s}, [data]] } end request = Rack::MockRequest.env_for("/?#{Rack::Utils.build_query(vars)}") builder.call(request).last.should == ["<html><body>\nresource\n</body></html>"] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
esi-for-rack-0.0.4 | spec/http_integration/query_string_spec.rb |