Sha256: f19fb252f247eaaf8bea218a0b3e3dc5f144a84d47b5e56c16198b9d4a3835b1

Contents?: true

Size: 1.16 KB

Versions: 9

Compression:

Stored size: 1.16 KB

Contents

# -*- encoding: utf-8 -*-
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::BookJacketHelper do
  fixtures :all

  it "should get screenshot", :vcr => true do
    helper.screenshot_tag(manifestations(:manifestation_00003)).should eq "<a href=\"http://www.slis.keio.ac.jp/\"><img alt=\"これからの生命科学研究者のためのバイオ特許入門講座\" border=\"0\" height=\"128\" itemprop=\"image\" src=\"http://mozshot.nemui.org/shot?http://www.slis.keio.ac.jp/\" width=\"128\" /></a>"
  end

  it "should get book jacket" do
    helper.book_jacket_tag(manifestations(:manifestation_00001)).should =~ /<div id=\"gbsthumbnail\" class=\"book_jacket\"><\/div>/
  end

  it "should generate a link to Amazon" do
    helper.amazon_link(manifestations(:manifestation_00001).identifier_contents(:isbn).first).should =~ /http:\/\/www.amazon.co.jp\/dp\/4798002062/
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enju_manifestation_viewer-0.1.0.pre16 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre15 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre14 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre13 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre12 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre11 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre10 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre9 spec/helpers/book_jacket_helper_spec.rb
enju_manifestation_viewer-0.1.0.pre8 spec/helpers/book_jacket_helper_spec.rb