Sha256: 17d94d47d65b82b47a8c7986b9eedfeeae13f6f3963b70e8104b31d4d468e257

Contents?: true

Size: 776 Bytes

Versions: 32

Compression:

Stored size: 776 Bytes

Contents

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

describe "ReadState" do
  it_should_behave_like "SpecBootstrapHelper"
  it_should_behave_like "SourceAdapterHelper"

  it "should create refresh with correct id" do
    @r.id.should == "#{@a_fields[:name]}:#{@u_fields[:login]}:#{@s_fields[:name]}"
  end
  
  it "should create refresh with default fields" do
    @r.refresh_time.should <= Time.now.to_i
  end
  
  it "should load refresh with params" do
    @r1 = ReadState.load(:app_id => @a_fields[:name],
      :user_id => @u_fields[:login],:source_name => @s_fields[:name])
    @r1.refresh_time.should <= Time.now.to_i
  end
  
  it "should delete read_state from db" do
    ReadState.delete(@a_fields[:name])
    Store.db.keys("read_state*").should == []
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
rhosync-2.1.7 spec/read_state_spec.rb
rhosync-2.1.6 spec/read_state_spec.rb
rhosync-2.1.3 spec/read_state_spec.rb
rhosync-2.1.2 spec/read_state_spec.rb
rhosync-2.1.1 spec/read_state_spec.rb
rhosync-2.1.0 spec/read_state_spec.rb
rhosync-2.1.0.beta.2 spec/read_state_spec.rb
rhosync-2.1.0.beta.1 spec/read_state_spec.rb
rhosync-2.0.9 spec/read_state_spec.rb
rhosync-2.0.8 spec/read_state_spec.rb
rhosync-2.0.7 spec/read_state_spec.rb
rhosync-2.0.6 spec/read_state_spec.rb
rhosync-2.0.5 spec/read_state_spec.rb
rhosync-2.0.4 spec/read_state_spec.rb
rhosync-2.0.3 spec/read_state_spec.rb
rhosync-2.0.2 spec/read_state_spec.rb
rhosync-2.0.1 spec/read_state_spec.rb
rhosync-2.0.0 spec/read_state_spec.rb
rhosync-2.0.0.rc2 spec/read_state_spec.rb
rhosync-2.0.0.rc1 spec/read_state_spec.rb