Sha256: ee022cb1de2bfa77cbff1b3cfd133c2056bc63b0648de0a07bf5651c91c8d51a

Contents?: true

Size: 646 Bytes

Versions: 4

Compression:

Stored size: 646 Bytes

Contents

require 'test_helper'

class RecordTest < ActiveSupport::TestCase
  test "should be able to create a new Record" do
    rec = Record.new(:data => "itemType: book", :format => "csf")
    assert_equal "TY  - BOOK\nER  -\n\n", rec.to_ris
    assert_equal "@book{????\n}", rec.to_bibtex
    assert_equal "rft.ulr_ver=Z39.88-2004&rft.ctx_ver=Z39.88-2004&rft.rfr_id=info:sid/libraries.nyu.edu:citero&rft_val_fmlt=info:ofi/fmt:kev:mtx:book&rft.genre=book", rec.to_openurl
    assert_equal "{\"source\":\"book\",\"book\":{\"title\":null},\"pubtype\":{\"main\":\"pubnonperiodical\"},\"pubnonperiodical\":{},\"contributors\":[]}", rec.to_easybib
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
acts_as_citable-3.0.0.pre.alpha test/dummy/test/unit/record_test.rb
acts_as_citable-2.0.2 test/dummy/test/unit/record_test.rb
acts_as_citable-2.0.1 test/dummy/test/unit/record_test.rb
acts_as_citable-2.0.0 test/dummy/test/unit/record_test.rb