Sha256: 6cbc2987c4d2f82355c25dc218f4750dd8d9d7ad0e193b243dfe20956dfaa4b7

Contents?: true

Size: 1.32 KB

Versions: 14

Compression:

Stored size: 1.32 KB

Contents

require 'spec_helper'

# Specs in this file have access to a helper object that includes
# the PatronsHelper. For example:
#
# describe PatronsHelper do
#   describe "string concat" do
#     it "concats two strings with spaces" do
#       helper.concat_strings("this","that").should == "this that"
#     end
#   end
# end
describe EnjuManifestationViewer::ManifestationViewerHelper do
  fixtures :all

  it "should render google_books preview template" do
    helper.google_book_search_preview(manifestations(:manifestation_00001).identifier_contents(:isbn).first).should =~ /<div id='google_book_search_content'>/
  end

  it "should render youtube template" do
    helper.embed_content(manifestations(:manifestation_00022)).should =~ /<param name="movie" value="http:\/\/www.youtube.com\/v\//
  end

  it "should render nicovideo template" do
    helper.embed_content(manifestations(:manifestation_00023)).should =~ /<script type="text\/javascript" src="http:\/\/ext.nicovideo.jp\/thumb_watch\//
  end

  it "should render flickr template" do
    helper.embed_content(manifestations(:manifestation_00217)).should =~ /<object width="400" height="300"><param name="flashvars"/
  end

  #it "should render scribd template" do
  #  helper.embed_content(manifestations(:manifestation_00001)).should =~ /<td colspan="2" style="width: 700px">/
  #end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
enju_manifestation_viewer-0.1.1 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre19 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre18 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre17 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre16 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre15 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre14 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre13 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre12 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre11 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre10 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre9 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre8 spec/helpers/manifestation_viewer_helper_spec.rb