Sha256: 3b0464748573d170e0407217f2ca003c74100a588cb50db34b2afc73c8ced4b7

Contents?: true

Size: 909 Bytes

Versions: 65

Compression:

Stored size: 909 Bytes

Contents

require "spec_helper"

describe SC::ManifestEntry, 'timestamp_url' do

  include SC::SpecHelpers

  before do
    @project = fixture_project(:real_world)
    @target = @project.target_for :contacts
    @manifest = @target.manifest_for(:language => :en)

    # create entry manually to avoid calling prepare
    @entry = SC::ManifestEntry.new @manifest,
      :filename => "filename",
      :url => "foo",
      :source_path => "imaginary" / "path"
  end

  it "should return url itself if timestamp_url config is false" do
    @target.config.timestamp_urls = false # preconditon
    @entry.cacheable_url.should == 'foo'
  end

  it "should return url with timestamp token appended as query string if timestamp_url is true" do
    @target.config.timestamp_urls = true # preconditon
    @entry.timestamp.should_not be_blank # preconditon
    @entry.cacheable_url.should == "foo?#{@entry.timestamp}"
  end


end

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
sproutcore-1.5.0.rc.1 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.5.0.pre.5 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.5.0.pre.4.1 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.5.0.pre.4 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.5.0.pre.3 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.5 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.5-java spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.4-java spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.4 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.3.1 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.3-java spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.3 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.2-java spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.2 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.1-java spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.1 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.0-java spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.0 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.0.rc.5 spec/lib/models/manifest_entry/cacheable_url_spec.rb
sproutcore-1.4.0.rc.4 spec/lib/models/manifest_entry/cacheable_url_spec.rb