Sha256: 1f91bb578b0ecc833681a5d4c30fab44dbb2c8d7b934bd9eae1730735cd0cf77
Contents?: true
Size: 817 Bytes
Versions: 4
Compression:
Stored size: 817 Bytes
Contents
require File.dirname(__FILE__) + '/base' require File.dirname(__FILE__) + '/../lib/taps/server' require 'pp' describe Taps::Server do def app Taps::Server.new end before do Taps::Config.login = 'taps' Taps::Config.password = 'tpass' @app = Taps::Server @auth_header = "Basic " + ["taps:tpass"].pack("m*") end it "asks for http basic authentication" do get '/' last_response.status.should == 401 end it "verifies the client taps version" do get('/', { }, { 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => Taps.compatible_version }) last_response.status.should == 200 end it "yells loudly if the client taps version doesn't match" do get('/', { }, { 'HTTP_AUTHORIZATION' => @auth_header, 'HTTP_TAPS_VERSION' => '0.0.1' }) last_response.status.should == 417 end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
taps-0.2.26 | spec/server_spec.rb |
taps-0.2.25 | spec/server_spec.rb |
taps-0.2.24 | spec/server_spec.rb |
taps-0.2.23 | spec/server_spec.rb |