blob: 94e8f06589461181aab025eb30764fa13d7558a4 [file] [log] [blame]
Tests WI.ObjectStore.prototype.delete.
== Running test suite: WI.ObjectStore.prototype.delete
-- Running test case: WI.ObjectStore.prototype.delete.NoParameters
put: [{"b":2}]
PASS: Should produce an exception.
TypeError: Not enough arguments
[{"b":2}]
-- Running test case: WI.ObjectStore.prototype.delete.MissingObject
put: [{"b":2}]
PASS: Should produce an exception.
DataError: Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key.
[{"b":2}]
-- Running test case: WI.ObjectStore.prototype.delete.Boolean
put: [false]
put: [false,true]
delete: [true]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Number
put: [11]
put: [11,22]
delete: [22]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.String
put: ["foo"]
put: ["foo","bar"]
delete: ["bar"]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Array
put: [[11]]
put: [[11],[22]]
delete: [[22]]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Null
put: [null]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.WithoutKeyPathOrAutoIncrement
PASS: Should produce an exception.
DataError: Failed to store record in an IDBObjectStore: The object store uses out-of-line keys and has no key generator and the key parameter was not provided.
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathMissingOnObjectWithoutAutoIncrement
PASS: Should produce an exception.
DataError: Failed to store record in an IDBObjectStore: Evaluating the object store's key path did not yield a value.
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathSetOnObjectWithoutAutoIncrement
put: [{"KeyPathSetOnObjectWithoutAutoIncrement":42,"a":1}]
put: [{"KeyPathSetOnObjectWithoutAutoIncrement":42,"a":1},{"KeyPathSetOnObjectWithoutAutoIncrement":99,"b":2}]
delete: [{"KeyPathSetOnObjectWithoutAutoIncrement":99,"b":2}]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathMissingOnObjectWithAutoIncrement
put: [{"a":1,"KeyPathMissingOnObjectWithAutoIncrement":1}]
put: [{"a":1,"KeyPathMissingOnObjectWithAutoIncrement":1},{"b":2,"KeyPathMissingOnObjectWithAutoIncrement":2}]
delete: [{"b":2,"KeyPathMissingOnObjectWithAutoIncrement":2}]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathSetOnObjectWithAutoIncrement
put: [{"KeyPathSetOnObjectWithAutoIncrement":42,"a":1}]
put: [{"KeyPathSetOnObjectWithAutoIncrement":42,"a":1},{"KeyPathSetOnObjectWithAutoIncrement":99,"b":2}]
delete: [{"KeyPathSetOnObjectWithAutoIncrement":99,"b":2}]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.AutoIncrementWithoutKeyPath
put: [{"a":1}]
put: [{"a":1},{"b":2}]
delete: [{"b":2}]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathSetOnObjectWithoutAutoIncrement.Sub
put: [{"KeyPathSetOnObjectWithoutAutoIncrement":{"Sub":42},"a":1}]
put: [{"KeyPathSetOnObjectWithoutAutoIncrement":{"Sub":42},"a":1},{"KeyPathSetOnObjectWithoutAutoIncrement":{"Sub":99},"b":2}]
delete: [{"KeyPathSetOnObjectWithoutAutoIncrement":{"Sub":99},"b":2}]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathMissingOnObjectWithAutoIncrement.Sub
put: [{"a":1,"KeyPathMissingOnObjectWithAutoIncrement":{"Sub":1}}]
put: [{"a":1,"KeyPathMissingOnObjectWithAutoIncrement":{"Sub":1}},{"b":2,"KeyPathMissingOnObjectWithAutoIncrement":{"Sub":2}}]
delete: [{"b":2,"KeyPathMissingOnObjectWithAutoIncrement":{"Sub":2}}]
delete: []
[]
-- Running test case: WI.ObjectStore.prototype.delete.Object.KeyPathSetOnObjectWithAutoIncrement.Sub
put: [{"KeyPathSetOnObjectWithAutoIncrement":{"Sub":42},"a":1}]
put: [{"KeyPathSetOnObjectWithAutoIncrement":{"Sub":42},"a":1},{"KeyPathSetOnObjectWithAutoIncrement":{"Sub":99},"b":2}]
delete: [{"KeyPathSetOnObjectWithAutoIncrement":{"Sub":99},"b":2}]
delete: []
[]