diff --git a/web/spec/features/youtube_spec.rb b/web/spec/features/youtube_spec.rb index a4a34a8d6..70c76fefe 100644 --- a/web/spec/features/youtube_spec.rb +++ b/web/spec/features/youtube_spec.rb @@ -1,5 +1,6 @@ require 'spec_helper' require 'youtube_client' +require 'rest_client' describe "YouTube", :js=>true, :type => :feature, :capybara_feature => true do @@ -49,7 +50,6 @@ describe "YouTube", :js=>true, :type => :feature, :capybara_feature => true do end it "upload url should allow uploading" do - pending "fix this" vid_path = Rails.root.join('spec', 'files', 'test_video.mp4') length = File.size?(vid_path) upload_hash=@youtube_client.upload_sign(@user, "test_video.mp4", length) @@ -63,7 +63,9 @@ describe "YouTube", :js=>true, :type => :feature, :capybara_feature => true do upload_hash['Content-Length'].should eq(length) upload_hash['Content-Type'].should_not be_nil - # Now upload the file to URL specified: + # Upload this file as the client would: + RestClient.put(upload_hash['url'], File.read(vid_path)); + end it "status check should work " do