Sha256: e2fe3a9426c725d9ff1335766dd850b989cc7c41412183d15b79163e682549da

Contents?: true

Size: 1.4 KB

Versions: 18

Compression:

Stored size: 1.4 KB

Contents

require 'spec_helper'

describe StorageRoom::DeletedEntry do

  
  context "Instance" do
    before(:each) do
      @hash = {
        '@type' => 'DeletedEntry',
        '@url'  => "http://api.storageroomapp.com/accounts/4e1e9c234250712eba000052/deleted_entries/4e269c0f42507106fc000001",
        '@account_url'  => "http://api.storageroomapp.com/accounts/4e1e9c234250712eba000052",
        '@collection_url'  => "http://api.storageroomapp.com/accounts/4e1e9c234250712eba000052/collections/4e1e9c234250712eba000056",
        '@entry_url'  => "http://api.storageroomapp.com/accounts/4e1e9c234250712eba000052/collections/4e1e9c234250712eba000056/entries/4e269c2742507106fc000004",
        '@deleted_at' => "2011-07-20T09:13:13Z"
      }
      @deleted_entry = StorageRoom::Resource.new_from_response_data(@hash)
    end
    
    describe "#entry_url" do
      it "should return url" do
        @deleted_entry.entry_url.should == @hash['@entry_url']
      end
    end
    
    describe "#entry_id" do
      it "should return id" do
        @deleted_entry.entry_id.should == '4e269c2742507106fc000004'
      end
    end
    
    describe "#collection_url" do
      it "should return url" do
        @deleted_entry.collection_url.should == @hash['@collection_url']
      end
    end
    
    describe "#deleted_at" do
      it "should return date" do
        @deleted_entry.deleted_at.should be_present
      end
    end 
    
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
storage_room-0.3.24 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.23 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.22 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.21 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.20 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.19 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.18 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.17 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.16 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.15 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.14 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.13 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.12 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.11 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.10 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.9 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.8 spec/storage_room/models/deleted_entry_spec.rb
storage_room-0.3.7 spec/storage_room/models/deleted_entry_spec.rb