Sha256: 3a6d00537b4a9960b34af49ad3b66fe9f80f2042a954e01a1f6117d9fd2e8794

Contents?: true

Size: 595 Bytes

Versions: 15

Compression:

Stored size: 595 Bytes

Contents

require 'spec_helper'

module ApiResource
  module Associations
    
    describe HasOneRemoteObjectProxy do

      before(:all) do
        TestResource.reload_resource_definition
      end

      context "#load" do
        
        it "correctly loads data from an endpoint that returns
          a single record" do
          
          tr = TestResource.new(
            :has_one_object => {:service_uri => "/has_one_objects/1.json"} 
          )
          tr.has_one_object.internal_object.should be_instance_of(
            HasOneObject
          )
        end

      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
api_resource-0.6.21 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.20 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.19 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.18 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.17 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.16 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.15 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.14 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.13 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.12 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.11 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.9 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.10 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.8 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.7 spec/lib/associations/has_one_remote_object_proxy_spec.rb