Sha256: 1a438c6d8df69d059c943debf1d6aa24ed71e7068f28d41a116e4ee9b7a51968

Contents?: true

Size: 1.32 KB

Versions: 9

Compression:

Stored size: 1.32 KB

Contents

require 'rails_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

9 entries across 9 versions & 2 rubygems

Version Path
enju_manifestation_viewer-0.2.3 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.2 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.1 spec/helpers/manifestation_viewer_helper_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_manifestation_viewer-0.2.0/spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.0 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.0.beta.4 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.0.beta.3 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.0.beta.2 spec/helpers/manifestation_viewer_helper_spec.rb
enju_manifestation_viewer-0.2.0.beta.1 spec/helpers/manifestation_viewer_helper_spec.rb