Sha256: e8fa1bf3e384856a21da1836d89d4e3ed2940bff82209c8b79f15005edbad425
Contents?: true
Size: 805 Bytes
Versions: 5
Compression:
Stored size: 805 Bytes
Contents
require File.dirname(__FILE__) + '/base' require '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.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
5 entries across 5 versions & 2 rubygems
Version | Path |
---|---|
taps-0.3.23 | spec/server_spec.rb |
taps-0.3.23.pre1 | spec/server_spec.rb |
taps-0.3.22.pre2 | spec/server_spec.rb |
taps-0.3.22.pre1 | spec/server_spec.rb |
taps-jruby-0.3.14 | spec/server_spec.rb |