Sha256: 2d629102e951706182405c8ab99c1f8e623902f6214c84b6b568a9142d8a5dab
Contents?: true
Size: 537 Bytes
Versions: 14
Compression:
Stored size: 537 Bytes
Contents
require 'spec_helper' describe CouchPotato::Persistence::Revisions, '#_revisions' do let(:db) { CouchPotato.database } class Thing include CouchPotato::Persistence property :title end before(:each) do recreate_db end it 'returns all available revisions of a document' do thing = Thing.new title: 't1' db.save! thing thing.title = 't2' db.save! thing expect(thing._revisions.map(&:title)).to eq(%w(t1 t2)) expect(thing._revisions.map {|t| t._rev[0, 1].to_i }).to eq([1, 2]) end end
Version data entries
14 entries across 14 versions & 1 rubygems