Sha256: d75e76b2cd682dcd3f5774ac5c68d10fb28ca9eb579504fc4109b1398f936ea0

Contents?: true

Size: 1019 Bytes

Versions: 14

Compression:

Stored size: 1019 Bytes

Contents

require File.join(File.dirname(__FILE__),'spec_helper')
require File.join(File.dirname(__FILE__), 'support', 'shared_examples')

describe "Document" do
  it_behaves_like "SharedRhoconnectHelper", :rhoconnect_data => true do
    before(:each) do
      @s = Source.load(@s_fields[:name],@s_params)
    end
    
    it "should generate client docname" do
      @c.docname(:foo).should == "client:#{@a.id}:#{@u.id}:#{@c.id}:#{@s_fields[:name]}:foo"
    end

    it "should generate source docname" do
      @s.docname(:foo).should == "source:#{@a.id}:#{@u.id}:#{@s_fields[:name]}:foo"
    end

    it "should flash_data for docname" do
      @c.put_data(:foo1,{'1'=>@product1})
      Store.db.keys(@c.docname('*')).should == [@c.docname(:foo1)]
      @c.flash_data('*')
      Store.db.keys(@c.docname(:foo)).should == []
    end

    it "should rename doc" do
      set_state(@c.docname(:key1) => @data)
      @c.rename(:key1,:key2)
      verify_result(@c.docname(:key1) => {}, @c.docname(:key2) => @data)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rhoconnect-3.1.1 spec/document_spec.rb
rhoconnect-3.1.0 spec/document_spec.rb
rhoconnect-3.1.0.beta2 spec/document_spec.rb
rhoconnect-3.1.0.beta1 spec/document_spec.rb
rhoconnect-3.0.6 spec/document_spec.rb
rhoconnect-3.0.5 spec/document_spec.rb
rhoconnect-3.0.4 spec/document_spec.rb
rhoconnect-3.0.3 spec/document_spec.rb
rhoconnect-3.0.2 spec/document_spec.rb
rhoconnect-3.0.1 spec/document_spec.rb
rhoconnect-3.0.0 spec/document_spec.rb
rhoconnect-3.0.0.rc1 spec/document_spec.rb
rhoconnect-3.0.0.beta3 spec/document_spec.rb
rhoconnect-3.0.0.beta1 spec/document_spec.rb