File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,38 @@ def test_file_upload
22
22
)
23
23
}
24
24
assert_instance_of String , direct_link
25
+
26
+ # replace method : thx id:rngtng
27
+ assert_nothing_raised {
28
+ direct_link = @gh . replace (
29
+ :repos => @repos ,
30
+ :file => 'test/test' ,
31
+ :description => "test file"
32
+ )
33
+ }
34
+ assert_instance_of String , direct_link
25
35
end
26
36
27
37
def test_content_upload
28
38
direct_link = nil
39
+ time = Time . now . to_i
29
40
assert_nothing_raised {
30
41
direct_link = @gh . upload (
31
42
:repos => @repos ,
32
43
:data => 'test' ,
33
- :name => "test_#{ Time . now . to_i } .txt" ,
44
+ :name => "test_#{ time } .txt" ,
45
+ :content_type => 'text/plain' ,
46
+ :description => "test file2"
47
+ )
48
+ }
49
+ assert_instance_of String , direct_link
50
+
51
+ # replace method : thx id:rngtng
52
+ assert_nothing_raised {
53
+ direct_link = @gh . replace (
54
+ :repos => @repos ,
55
+ :data => 'test' ,
56
+ :name => "test_#{ time } .txt" ,
34
57
:content_type => 'text/plain' ,
35
58
:description => "test file2"
36
59
)
You can’t perform that action at this time.
0 commit comments