Sha256: 5b212dd5a6b30f567b3a07a4d97173d8dbd736495360637f52614cfed1209dbe

Contents?: true

Size: 1 KB

Versions: 18

Compression:

Stored size: 1 KB

Contents

# encoding: utf-8

require "spec_helper"

describe "update_attributes" do
  describe_example "update_attributes/embeds_one" do
    it "updates customer item name" do
      @root.item.id.should == nil
      @root.item.name.should == "name"
    end
  end

  describe_example "update_attributes/simple" do
    it "updates customer login" do
      @root.login.should == "newjackiechan2010"
    end
  end

  describe_example "update_attributes/embeds_many" do
    it "updates customer items" do
      @root.items.count.should == 1
      @root.items.first.id.should == 3000
    end
  end

  describe_example "update_attributes/has_one" do
    it "updates customer billing" do
      @root.billing.should_not be_nil
      @root.billing.login.should == "new_billing_login"
    end
  end

  describe_example "update_attributes/has_many" do
    it "updates customer services" do
      @root.services.should_not be_nil
      @root.services.count.should == 1
      @root.services.first.name.should == "new_service_name"
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
rest_model-0.1.21 spec/integration/update_attributes_spec.rb
rest_model-0.1.20 spec/integration/update_attributes_spec.rb
rest_model-0.1.19 spec/integration/update_attributes_spec.rb
rest_model-0.1.18 spec/integration/update_attributes_spec.rb
rest_model-0.1.17 spec/integration/update_attributes_spec.rb
rest_model-0.1.16 spec/integration/update_attributes_spec.rb
rest_model-0.1.15 spec/integration/update_attributes_spec.rb
rest_model-0.1.14 spec/integration/update_attributes_spec.rb
rest_model-0.1.13 spec/integration/update_attributes_spec.rb
rest_model-0.1.12 spec/integration/update_attributes_spec.rb
rest_model-0.1.11 spec/integration/update_attributes_spec.rb
rest_model-0.1.10 spec/integration/update_attributes_spec.rb
rest_model-0.1.9 spec/integration/update_attributes_spec.rb
rest_model-0.1.8 spec/integration/update_attributes_spec.rb
rest_model-0.1.7 spec/integration/update_attributes_spec.rb
rest_model-0.1.6 spec/integration/update_attributes_spec.rb
rest_model-0.1.5 spec/integration/update_attributes_spec.rb
rest_model-0.1.4 spec/integration/update_attributes_spec.rb