Sha256: 4c94ba178f35a9717ec0f6fc936b1922cda444b595c1627551ed8f0cf02b67ba

Contents?: true

Size: 733 Bytes

Versions: 28

Compression:

Stored size: 733 Bytes

Contents

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

describe HydraUploaderHelper do
  
  describe "upload_url" do
    it "should use container_id if its available" do
      helper.stubs(:params).returns(:asset_id=>"foo:22")
      helper.upload_url.should == "/assets/foo:22/file_assets"
    end
    it "should assume params[\"id\"] is pid of container when container_id is not set" do
      helper.stubs(:params).returns(:controller=>"catalog", :action=>"show", :id=>"foo:25")
      helper.upload_url.should == "/assets/foo:25/file_assets"
      helper.stubs(:params).returns(:controller=>"assets", :action=>"show", :id=>"foo:25")
      helper.upload_url.should == "/assets/foo:25/file_assets"
    end
  end
  
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
hydra-head-3.3.0 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.2.2 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.2.1 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.2.0 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.2.0.pre3 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.2.0.pre2 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.2.0.pre1 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.5 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.4 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.3 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.2 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.1 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0.rc2 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0.rc1 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0.pre5 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0.pre4 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0.pre3 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.0.1 test_support/spec/helpers/hydra_uploader_helper_spec.rb
hydra-head-3.1.0.pre2 test_support/spec/helpers/hydra_uploader_helper_spec.rb