Permalink
Browse files

Some initial tests for http-hosted videos.

  • Loading branch information...
1 parent e902067 commit 1b2c0a283d17c97d3bb568b8da438cade5c03d89 dave committed Oct 22, 2010
Showing with 20 additions and 2 deletions.
  1. +20 −2 test/test_video.rb
View
@@ -73,8 +73,26 @@ class TestVideo < Test::Unit::TestCase
end
-# context "available via http" do
-# end
+ context "available via http" do
+ setup do
+ @video = Video.make(:location => "http://foo.org/vids/var.mov")
+ end
+
+ should "have an initial state of 'waiting_for_download'" do
+ assert_equal("waiting_for_download", @video.state)
+ end
+
+ should "transition to state 'downloading' on 'download!' command" do
+ @video.download!
+ assert_equal("downloading", @video.state)
+ end
+
+ should "transition to state 'unencoded' on 'download_complete!' command" do
+ @video.download!
+ @video.download_complete!
+ assert_equal("unencoded", @video.state)
+ end
+ end
end

0 comments on commit 1b2c0a2

Please sign in to comment.