public
Description: Newzbin Library to search Newzbin
Clone URL: git://github.com/maddox/newzbin.git
more specs
maddox (author)
Thu Feb 21 06:37:20 -0800 2008
commit  060521516c9538f67fa717d39131c72c0be668b0
tree    2742f3e90bff09422b2a5eb6a8ffa5e5ea4cfd52
parent  1b7bcd74cabc1ec85957612a8879bf7bbbad381e
...
53
54
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
...
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
0
@@ -53,4 +53,45 @@ describe Connection, "when first creating with username and pass" do
0
 
0
 end
0
 
0
+describe Connection, "when doing a search without cookies" do
0
+ before(:each) do
0
+ newzbin_conn = Connection.new
0
+ @nzbs = newzbin_conn.search(:q => 'independence day', :ps_rb_video_format => 16, "category"=>"6", "commit"=>"search")
0
+ end
0
+
0
+ it "should return an array of items" do
0
+ @nzbs.class.should be(Array)
0
+ end
0
+
0
+ it "should return items" do
0
+ @nzbs.size.should have_at_least(1).things
0
+ end
0
+
0
+ it "should get attributes for nzbs" do
0
+ @nzbs.first.attributes.size.should eql(0)
0
+ end
0
+
0
+end
0
+
0
+describe Connection, "when doing a search with cookies" do
0
+ before(:each) do
0
+ newzbin_conn = Connection.new(:nzbSmoke => "RKTU0McXx%24Uc4e4KXP1L0sl4O1U9YOchO%2B0DA%3D", :nzbSessionID => "a0fed567eb1a3e6e95c8a3d46fe0c6e7")
0
+ @nzbs = newzbin_conn.search(:q => 'independence day', :ps_rb_video_format => 16, "category"=>"6", "commit"=>"search")
0
+ end
0
+
0
+ it "should return an array of items" do
0
+ @nzbs.class.should be(Array)
0
+ end
0
+
0
+ it "should return items" do
0
+ @nzbs.size.should have_at_least(1).things
0
+ end
0
+
0
+ it "should get attributes for nzbs" do
0
+ @nzbs.first.attributes.size.should have_at_least(1).things
0
+ end
0
+
0
+end
0
+
0
+
0
 
...
2
3
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
@@ -2,3 +2,22 @@ require 'newzbin'
0
 include Newzbin
0
 
0
 
0
+describe Connection, "when first creating without cookies or user/pass" do
0
+ before(:each) do
0
+
0
+ newz.search(:q => 'independence day', :ps_rb_video_format => 16, "category"=>"6", "commit"=>"search")
0
+ end
0
+
0
+ it "should have a host" do
0
+ @newzbin_conn.host.should eql('http://v3.newzbin.com')
0
+ end
0
+
0
+ it "should have a search path" do
0
+ @newzbin_conn.search_path.should eql('/search/')
0
+ end
0
+
0
+ it "should have a dnzb path path" do
0
+ @newzbin_conn.dnzb_path.should eql('/dnzb')
0
+ end
0
+
0
+end

Comments

    No one has commented yet.