Sha256: c4e42727585421b431b2d2833a5f560c81b4ca040156f1df8843ec6c5766bd61

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe Riiif::OpenseadragonHelper do

  it "should draw the viewer" do
    out = openseadragon_viewer('world')
    out.should == '<div id="openseadragon1"></div><script>
//<![CDATA[
        function initOpenSeadragon() {
          OpenSeadragon({
            id: "openseadragon1",
            prefixUrl: "/assets/openseadragon/",
            tileSources:   [{
            "image_host":     "/image-service",
            "identifier":   "world",   
            "width":        800,   
            "height":       400,   
            "scale_factors": [1, 2, 3, 4, 5],   
            "tile_width":   1024,   
            "tile_height":  1024,   
            "formats":      [ "jpg", "png" ],   
            "qualities":    ["native", "bitonal", "grey", "color"],   
            "profile":      "http://library.stanford.edu/iiif/image-api/compliance.html#level3"
            }]
          });
        }
        window.onload = initOpenSeadragon;
        document.addEventListener("page:load", initOpenSeadragon); // Initialize when using turbolinks

//]]>
</script>'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
riiif-0.0.6 spec/helpers/openseadragon_helper_spec.rb