Skip to content

Commit

Permalink
removed stale tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NDMarcel committed Nov 9, 2010
1 parent a822fe6 commit c2469ca
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 54 deletions.
9 changes: 0 additions & 9 deletions test/fixtures/advanced/upload/confirm.json

This file was deleted.

6 changes: 0 additions & 6 deletions test/fixtures/advanced/upload/manifest_to_upload.json

This file was deleted.

11 changes: 0 additions & 11 deletions test/fixtures/advanced/upload/verify_manifest.json

This file was deleted.

31 changes: 3 additions & 28 deletions test/vimeo/advanced/upload_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,23 @@
class UploadTest < Test::Unit::TestCase

context "vimeo advanced upload" do

setup do
@upload = Vimeo::Advanced::Upload.new("12345", "secret", :token => "token", :secret => "secret")
end

should "be able confirm an upload" do
stub_post("?api_key=12345&ticket_id=ticket_id&format=json&auth_token=token&api_sig=576b41966709651aead8754b3c5d370d&method=vimeo.videos.upload.confirm", "advanced/upload/confirm.json")
response = @upload.confirm("ticket_id")

assert_equal "ticket_id", response["ticket"]["id"]
end

should "be able to get a user's quota" do
stub_post("?api_key=12345&auth_token=token&format=json&api_sig=4eb2da55156fca5ab81bfe1a67a016ec&method=vimeo.videos.upload.getQuota", "advanced/upload/get_quota.json")
response = @upload.get_quota

assert_equal "888046", response["user"]["id"]
end

should "be able to get an upload ticket" do
stub_post("?api_key=12345&auth_token=token&format=json&api_sig=0eabe7404e1c1fd22a269190c36e4093&method=vimeo.videos.upload.getTicket", "advanced/upload/get_ticket.json")
response = @upload.get_ticket

assert_equal "ticket_id", response["ticket"]["id"]
end

# TODO: Stub out the HTTPClient calls correctly since FakeWeb doesn't work here.
# should "be able to upload a file to vimeo" do
# HTTPClient.any_instance.stubs(:post)
# file_path = File.expand_path(File.dirname(__FILE__) + "../../../fixtures/advanced/upload/sample_iTunes.mov")
# response = @upload.upload(file_path, "ticket_id", "http:\/\/67.202.6.15\/upload_multi?ticket_id=ticket_id")
#
# assert_equal "MD5", response
# end

# TODO: Make sure this manifest fixture file is right.
should "be able to verify a file manifest" do
stub_post("?api_key=12345&ticket_id=ticket_id&format=json&auth_token=token&api_sig=3b1c022ba0be09e5901bd91fb5a4426c&method=vimeo.videos.upload.verifyManifest", "advanced/upload/verify_manifest.json")
response = @upload.verify_manifest("ticket_id")

assert_equal "ticket_id", response["ticket"]["id"]
end

end
end

0 comments on commit c2469ca

Please sign in to comment.