Sha256: 0995297d995104fc9f0bf1c8a1cab01dbfd3a20e71a18b2e5b2a8acbd44a5bfa
Contents?: true
Size: 888 Bytes
Versions: 1
Compression:
Stored size: 888 Bytes
Contents
require File.expand_path('../helper', __FILE__) require File.expand_path('../settings', __FILE__) class TestEngine < Test::Unit::TestCase def test_login_with_good_password assert Gattica.new(GatticaTest::DEFAULT_AUTH), "should have been able to login" end # # def test_low_timeout # ga = Gattica.new(GatticaTest::DEFAULT_AUTH.merge!({ :debug =>false, :timeout => 1 })) # puts ga.accounts.inspect # end def test_login_with_bad_user_password assert_raise GatticaError::CouldNotAuthenticate do Gattica.new({ :email => 'bad-email@gmail.com', :password => 'bad-password'}) end end def test_raise_error_when_no_user_pass_or_token_specified assert_raise GatticaError::NoLoginOrToken do Gattica.new() end end # # def test_use_an_existing_token # token = Gattica.new(@auth).token # assert Gattica.new({ :token => token }) # end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
songphi-gattica-0.5.3 | test/test_engine.rb |