From 1dda547904769b1b191c26657f5bce59c5bd526c Mon Sep 17 00:00:00 2001 From: Steven Bazyl Date: Mon, 4 Jun 2012 16:53:37 -0700 Subject: [PATCH] More tests for media upload --- spec/google/api_client/discovery_spec.rb | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/spec/google/api_client/discovery_spec.rb b/spec/google/api_client/discovery_spec.rb index f57055fa9..f9b9d2df6 100644 --- a/spec/google/api_client/discovery_spec.rb +++ b/spec/google/api_client/discovery_spec.rb @@ -595,4 +595,27 @@ describe Google::APIClient do end).should raise_error(ArgumentError) end end + + describe 'with the Drive API' do + before do + @client.authorization = nil + @drive = @client.discovered_api('drive', 'v1') + end + + it 'should include media upload info methods' do + @drive.files.insert.media_upload.should_not == nil + end + + it 'should include accepted media types' do + @drive.files.insert.media_upload.accepted_types.should_not be_empty + end + + it 'should have an upload path' do + @drive.files.insert.media_upload.uri_template.should_not == nil + end + + it 'should have a max file size' do + @drive.files.insert.media_upload.max_size.should_not == nil + end + end end