Sha256: 9757866e5aec1721080351bb1b6d0ced9f3a0bb17df253394f6379e64605eb35

Contents?: true

Size: 543 Bytes

Versions: 21

Compression:

Stored size: 543 Bytes

Contents

require 'spec_helper'

module ApiResource
  module Associations
    
    describe BelongsToRemoteObjectProxy do

      before(:all) do
        TestResource.reload_resource_definition
      end

      context "#remote_path" do

        it "allows for custom named relationships and constructs the 
          correct remote path" do
          
          tr = TestResource.new(:custom_name_id => 123)
          tr.custom_name.remote_path.should eql(
            "/belongs_to_objects/123.json"
          )
        end

      end

    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
api_resource-0.6.25 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.24 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.23 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.22 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.21 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.20 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.19 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.18 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.17 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.16 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.15 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.14 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.13 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.12 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.11 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.9 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.10 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.8 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.7 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb
api_resource-0.6.6 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb