Sha256: 66fa4b92ff03faa6eef03f6e3ab7a5395ab8946f7446ce2f74449e6855969fc8
Contents?: true
Size: 738 Bytes
Versions: 2
Compression:
Stored size: 738 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 == ["<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"http://www.w3.org/TR/REC-html40/loose.dtd\">\n<html><body>resource</body></html>\n"] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
joshbuddy-esi-for-rack-0.0.1 | spec/http_integration/query_string_spec.rb |
joshbuddy-esi-for-rack-0.0.2 | spec/http_integration/query_string_spec.rb |