Sha256: a72e23e736f414cb245dd5c99fc4c5f255a878b1cc56c50f0891e98c536031cc
Contents?: true
Size: 642 Bytes
Versions: 3
Compression:
Stored size: 642 Bytes
Contents
require 'spec_helper' describe Sinatra::Presence do it "should initialize with :local_authority set to 127.0.0.1" do expect(TestApp.local_authority).to eq('http://127.0.0.1:9292') end # validate rack-test is working it "should respond to '/'" do get '/' expect(last_response.body).to eq("Hellocal") end it "should respond to '/local'" do get '/local' end it "should redirect requests to '/local'" do get '/local' expect(last_response).to be_redirect end it "should set a cookie" do get '/' expect(rack_mock_session.cookie_jar["local_url"]).to eq("http://127.0.0.1:9292/") end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sinatra-presence-0.0.4 | spec/extension_spec.rb |
sinatra-presence-0.0.3 | spec/extension_spec.rb |
sinatra-presence-0.0.2 | spec/extension_spec.rb |