Sha256: 4741c856e57fddc875962d9c2ad8d4b851b423927a8dfba5bf15a342f9e4dac3

Contents?: true

Size: 1.33 KB

Versions: 5

Compression:

Stored size: 1.33 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::ApplicationHelper 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 =~ /frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen/
  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

5 entries across 5 versions & 1 rubygems

Version Path
enju_manifestation_viewer-0.3.1 spec/helpers/application_helper_spec.rb
enju_manifestation_viewer-0.3.0 spec/helpers/application_helper_spec.rb
enju_manifestation_viewer-0.3.0.rc.1 spec/helpers/application_helper_spec.rb
enju_manifestation_viewer-0.3.0.beta.2 spec/helpers/application_helper_spec.rb
enju_manifestation_viewer-0.3.0.beta.1 spec/helpers/application_helper_spec.rb