Sha256: 15b3f7eba9984aff400b6f6456d8287bbb5173eeac378ce828864595f87b73ee

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

require "spec_helper"
describe NCMB do
  before do
    yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'setting.yml'))
    @ncmb = NCMB::Client.new(application_key: yaml['application_key'], 
                      client_key: yaml['client_key']
                      )
    @object_id = @ncmb.post('/2013-09-01/classes/TODO', todo: "Test task")[:objectId]
  end
  
  it "Delete #1" do
    res = @ncmb.delete("/2013-09-01/classes/TODO/#{@object_id}")
    res.should == {}
  end

  it "Delete #2" do
    res = @ncmb.delete("/2013-09-01/classes/TODO/doesnotexist")
    res[:code].should == 'E404001'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ncmb-ruby-client-0.0.8 spec/delete_spec.rb