Sha256: c678e5879f25c0d2dbd2f3ecb68843d35e5d10e5b4984432d84542e084917bf3
Contents?: true
Size: 1.44 KB
Versions: 10
Compression:
Stored size: 1.44 KB
Contents
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper") describe Animoto::DirectingAndRenderingJob do it "should have endpoint '/jobs/directing_and_rendering'" do Animoto::DirectingAndRenderingJob.endpoint.should == '/jobs/directing_and_rendering' end it "should have content_type 'application/vnd.animoto.directing_and_rendering_job'" do Animoto::DirectingAndRenderingJob.content_type.should == 'directing_and_rendering_job' end it "should have payload key 'directing_and_rendering_job'" do Animoto::DirectingAndRenderingJob.payload_key.should == 'directing_and_rendering_job' end describe "loading from a response body" do before do @body = { 'response' => { 'status' => { 'code' => 200 }, 'payload' => { 'directing_and_rendering_job' => { 'state' => 'completed', 'links' => { 'self' => 'http://animoto.com/jobs/directing_and_rendering/1', 'video' => 'http://animoto.com/videos/1' } } } } } @job = Animoto::DirectingAndRenderingJob.load @body 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 video from the video url" do @job.video.should be_an_instance_of(Animoto::Video) @job.video.url.should == @job.video_url end end end
Version data entries
10 entries across 10 versions & 1 rubygems