require File.join(File.dirname(__FILE__), 'test_helper')

class AuthenticatedTest < Test::Unit::TestCase
  include Octopi
  def setup
    fake_everything
  end
  
  context "Authenticating" do
    should "be possible with username and password" do
      authenticated_with(:user => "fcoury", :password => "yruocf") do
        assert_equal "6417354635233fbddf66de798c030f9f", Api.api.token
        assert_not_nil User.find("fcoury")
      end
    end
  end
  
  
end

require File.join(File.dirname(__FILE__), 'test_helper')

class AuthenticatedTest < Test::Unit::TestCase
  include Octopi
  def setup
    fake_everything
  end
  
  context "Authenticating" do
    should "be possible with username and password" do
      authenticated_with(:user => "fcoury", :password => "yruocf") do
        assert_equal "6417354635233fbddf66de798c030f9f", Api.api.token
        assert_not_nil User.find("fcoury")
      end
    end
    
    should "be possible with username and token" do
      auth do
        assert_not_nil User.find("fcoury")
      end
    end
    
    should "be possible using the .gitconfig" do
      authenticated do
        assert_not_nil User.find("fcoury")
      end
    end
  end
  
  
end

Add tests for the other two auth mechanisms.
Add tests for the other two auth mechanisms.
