Sha256: 72427aada56e4694df729f3be71107769f223154481f916cc87250a9a414f6c5

Contents?: true

Size: 962 Bytes

Versions: 1

Compression:

Stored size: 962 Bytes

Contents

dir = File.dirname(__FILE__)
require 'ruby-debug'
require File.join(".", dir, "..", "test_helper.rb")
require 'contacts'

class AolContactImporterTest < ContactImporterTestCase
  def setup
    super
    @account = TestAccounts[:aolImporter]
  end

  def test_successful_login
    Contacts.new(:aolImporter, @account.username, @account.password)
  end

  def test_importer_fails_with_blank_password
    assert_raise(Contacts::AuthenticationError) do
      Contacts.new(:aolImporter, @account.username, "")
    end
  end

  def test_importer_fails_with_blank_username
    assert_raise(Contacts::AuthenticationError) do
      Contacts.new(:aolImporter, "", @account.password)
    end
  end

  def test_fetch_contacts
    contacts = Contacts.new(:aolImporter, @account.username, @account.password).contacts
    @account.contacts.each do |contact|
      assert contacts.include?(contact), "Could not find: #{contact.inspect} in #{contacts.inspect}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
muck-contacts-2.6.1 test/unit/aol_contact_importer_test.rb