Sha256: 9fc060e2280476e66e41bccc9b6ec3e8b7a828b06f105d039a27341f89d8c521
Contents?: true
Size: 1.79 KB
Versions: 6
Compression:
Stored size: 1.79 KB
Contents
require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper") describe Animoto::Resources::Jobs::Rendering do it "should have endpoint /jobs/rendering" do Animoto::Resources::Jobs::Rendering.endpoint.should == '/jobs/rendering' end it "should have content type 'application/vnd.animoto.rendering_job'" do Animoto::Resources::Jobs::Rendering.content_type.should == 'rendering_job' end it "should have payload key 'rendering_job'" do Animoto::Resources::Jobs::Rendering.payload_key.should == 'rendering_job' end describe "loading from a response body" do before do @body = { 'response' => { 'status' => { 'code' => 200 }, 'payload' => { 'rendering_job' => { 'state' => 'completed', 'links' => { 'self' => 'http://animoto.com/jobs/rendering/1', 'storyboard' => 'http://animoto.com/storyboards/1', 'video' => 'http://animoto.com/videos/1' } } } } } @job = Animoto::Resources::Jobs::Rendering.load @body end it "should set the storyboard url from the body" do @job.storyboard_url.should == "http://animoto.com/storyboards/1" end it "should set the video url from the body" do @job.video_url.should == "http://animoto.com/videos/1" end it "should create a storyboard from the storyboard url" do @job.storyboard.should be_an_instance_of(Animoto::Resources::Storyboard) @job.storyboard.url.should == @job.storyboard_url end it "should create a video from the video url" do @job.video.should be_an_instance_of(Animoto::Resources::Video) @job.video.url.should == @job.video_url end end end
Version data entries
6 entries across 6 versions & 1 rubygems