forked from IceskYsl/blackbook
-
Notifications
You must be signed in to change notification settings - Fork 2
/
debug_blackbook.rb
51 lines (43 loc) · 1.7 KB
/
debug_blackbook.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
require './lib/blackbook'
def test_yahoo
yahoo = Blackbook.get :username => '<insert email address>', :password => '<insert password>'
puts "===== yahoo #{yahoo.inspect}"
# example contact info test
unless yahoo.detect{ |c| c[:name].downcase == 'AAA AAB'.downcase &&
c[:email] == '2404173112@vtext.com' &&
c[:mobile] == '(240) 417 3112' &&
c[:home_zip] == '38947' &&
c[:work_zip] == '21093' &&
c[:home_city].downcase == 'San Jose'.downcase &&
c[:work_city].downcase == 'Baltimore'.downcase &&
c[:home_state].downcase == 'TX'.downcase &&
c[:work_state].downcase == 'MD'.downcase
}
puts "Yahoo import not working"
exit 1
end
end
def test_hotmail
hotmail = Blackbook.get :username => '<insert email address>', :password => '<insert password>'
puts "===== hotmail #{hotmail.inspect}"
# example contact info test
unless hotmail.detect{|c| c[:name].downcase == 'Aaron Greenblatt'.downcase && c[:email] == 'green3521@erols.com'}
puts "Hotmail not working"
exit 1
end
end
def test_aol
aol = Blackbook.get :username => '<insert email address>', :password => '<insert password>'
puts "===== aol #{aol.inspect}"
# example contact info test
unless aol.detect{ |c| c[:name] == 'Joseph Amoyal' &&
c[:email] == 'jamoyal@gmail.com' &&
c[:mobile] == '2404173112'
}
puts "AOL not working"
exit 1
end
end
test_aol
# puts "-------------------------------------------------------"
test_yahoo