Sha256: ed0e0dc4fbe52dc4a4bc193f9f16fe8860038eacdd70c6e7e3862788adcbf118

Contents?: true

Size: 556 Bytes

Versions: 5

Compression:

Stored size: 556 Bytes

Contents

require "spec_helper"
describe NCMB do
  before do
    yaml = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'setting.yml'))
    NCMB.initialize application_key: yaml['application_key'],  client_key: yaml['client_key']
    @Todo = NCMB::DataStore.new('TODO')
    @todo = @Todo.new(text: "Test task")
    @object_id = @todo.save().objectId
  end
  
  it "Delete #1" do
    @todo.delete.should == true
  end

  it "Delete again" do
    @todo.delete.should == true
    @todo.delete.should == false
    @todo.error[:code].should == 'E404001'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ncmb-ruby-client-0.1.3 spec/delete_spec.rb
ncmb-ruby-client-0.1.2 spec/delete_spec.rb
ncmb-ruby-client-0.1.1 spec/delete_spec.rb
ncmb-ruby-client-0.1.0 spec/delete_spec.rb
ncmb-ruby-client-0.0.9 spec/delete_spec.rb