Skip to content

Commit c8d47d4

Browse files
committed
* add test for replace
1 parent e465c0e commit c8d47d4

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

test/github_test.rb

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,38 @@ def test_file_upload
2222
)
2323
}
2424
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
2535
end
2636

2737
def test_content_upload
2838
direct_link = nil
39+
time = Time.now.to_i
2940
assert_nothing_raised {
3041
direct_link = @gh.upload(
3142
:repos => @repos,
3243
: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",
3457
:content_type => 'text/plain',
3558
:description => "test file2"
3659
)

0 commit comments

Comments
 (0)