Sha256: 1ca6e23d7773231e77b22212e507087f11749ca499eab7971c58d94cda3db9e7

Contents?: true

Size: 572 Bytes

Versions: 4

Compression:

Stored size: 572 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

4 entries across 4 versions & 1 rubygems

Version Path
api_resource-0.6.25 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.24 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.23 spec/lib/associations/has_one_remote_object_proxy_spec.rb
api_resource-0.6.22 spec/lib/associations/has_one_remote_object_proxy_spec.rb