Sha256: 4c844abb9a03aaf7af1c3e8bb40e5e739832804d98d032f6c07aeff0ae0a7386
Contents?: true
Size: 840 Bytes
Versions: 1
Compression:
Stored size: 840 Bytes
Contents
# # Testing rufus-verbs # # jmettraux@gmail.com # # Sun Jan 13 12:33:03 JST 2008 # require File.dirname(__FILE__) + '/base.rb' class Auth0Test < Test::Unit::TestCase include TestBaseMixin include Rufus::Verbs # # Using an items server with the authentication on. # def setup @server = ItemServer.new :auth => :basic @server.start end def test_0 #res = get :uri => "http://localhost:7777/items" #assert_equal 200, res.code.to_i #assert_equal "{}", res.body.strip expect 401, nil, get(:uri => "http://localhost:7777/items") expect 401, nil, get( :uri => "http://localhost:7777/items", :http_basic_authentication => [ "toto", "wrong" ]) expect 200, {}, get( :uri => "http://localhost:7777/items?a", :http_basic_authentication => [ "toto", "toto" ]) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rufus-verbs-1.0.0 | test/auth0_test.rb |