Sha256: 51d1fd57d245d71a355e27ecf3eb84fed07c9554e6547865fa38e9600bfc4862

Contents?: true

Size: 1.39 KB

Versions: 10

Compression:

Stored size: 1.39 KB

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper")

describe Animoto::Resources::Jobs::StoryboardBundling do

  it "should have endpoint '/jobs/storyboard_bundling'" do
    Animoto::Resources::Jobs::StoryboardBundling.endpoint.should == '/jobs/storyboard_bundling'
  end
  
  it "should have content type 'application/vnd.animoto.storyboard_bundling_job'" do
    Animoto::Resources::Jobs::StoryboardBundling.content_type.should == 'storyboard_bundling_job'
  end
  
  it "should have payload key 'storyboard_bundling_job'" do
    Animoto::Resources::Jobs::StoryboardBundling.payload_key.should == 'storyboard_bundling_job'
  end

  describe "loading from a response body" do
    before do
      @body = {
        'response' => {
          'status' => {
            'code' => 200
          },
          'payload' => {
            'storyboard_bundling_job' => {
              'state' => 'completed',
              'links' => {
                'self' => 'https://platform.animoto.com/jobs/storyboard_bundling/1',
                'bundle' => 'http://some-kind-of-storage-service.com/animoto-bundles/1'
              }
            }
          }
        }
      }
      @job = Animoto::Resources::Jobs::StoryboardBundling.load @body
    end
    
    it "should set the bundle_url from the body" do
      @job.bundle_url.should == "http://some-kind-of-storage-service.com/animoto-bundles/1"
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
animoto-1.5.6 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.5.5 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.5.4 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.5.3 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.5.2 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.5.1 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.5.0 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.3.1 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.3.0 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb
animoto-1.2.0 ./spec/animoto/resources/jobs/storyboard_bundling_spec.rb