Sha256: 1a5eebe458634e1540b5d6283a4c1bb4bf95beb6a4f973790bd213d7a57a0a7d

Contents?: true

Size: 607 Bytes

Versions: 39

Compression:

Stored size: 607 Bytes

Contents

require 'spec_helper'

class MyExampleModel < Base
  include Concerns::Destroyable
  self.prefix = "/test/"
  self.element_name = "example"
end

describe Concerns::Destroyable, "Destroyable Concern" do

  before :each do
    stub_auth_request
    stub_api_get("/test/example", 'base.json')
    @model = MyExampleModel.first
  end

  it "should not be destroyed" do
    @model.destroyed?.should eq(false)
  end

  it "should be destroyable" do
    stub_api_delete("/some/place/20101230223226074201000000")
    @model = MyExampleModel.first
    @model.destroy
    @model.destroyed?.should eq(true)
  end

end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
spark_api-1.3.26 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.25 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.24 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.23 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.21 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.20 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.19 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.18 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.17 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.16 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.15 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.14 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.13 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.10 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.9 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.6 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.3 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.1 spec/unit/spark_api/models/concerns/destroyable_spec.rb
spark_api-1.3.0 spec/unit/spark_api/models/concerns/destroyable_spec.rb