Sha256: 54cb66a96b023ccf60fe1172f7c2f1ce5d76de7ebaa24b5866d5e9c5fe4a1ce3
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 Bytes
Contents
require 'spec/spec_helper' describe "esi cookie variable lookups" do it "should lookup a cookie variable" do vars = {'type' => 'user'} builder = Rack::Builder.new do use EsiForRack, {'/file/1' => 'resource'} run proc { |env| data = IO.read('spec/http_integration/fixtures/cookie/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)}") request['HTTP_COOKIE'] = 'id=1' 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/cookie_spec.rb |