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.5 spec/lib/associations/belongs_to_remote_object_proxy_spec.rb