Changed .and.have in tests to .with
diff --git a/tests/lib/client.test.js b/tests/lib/client.test.js
index fa76d45..1115f95 100644
--- a/tests/lib/client.test.js
+++ b/tests/lib/client.test.js
@@ -46,17 +46,19 @@
before(function(done) {
client = new UsergridClient()
client.GET(_collection, function(err, usergridResponse) {
- response = usergridResponse
done()
})
})
+
+
it('should not fail when a callback function is not passed', function() {
// note: this test will NOT fail gracefully inside the Mocha event chain
client.GET(_collection)
})
it('should return a 200 ok', function() {
+ console.log(response, client)
response.statusCode.should.equal(200)
})
@@ -65,15 +67,15 @@
})
it('response.first should exist and have a valid uuid', function() {
- response.first.should.be.an.Object.and.have.property('uuid').with.a.lengthOf(36)
+ response.first.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
it('response.entity should exist and have a valid uuid', function() {
- response.entity.should.be.an.Object.and.have.property('uuid').with.a.lengthOf(36)
+ response.entity.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
it('response.last should exist and have a valid uuid', function() {
- response.last.should.be.an.Object.and.have.property('uuid').with.a.lengthOf(36)
+ response.last.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
})
@@ -108,7 +110,7 @@
})
it('response.entity should exist and have a valid uuid', function() {
- response.entity.should.be.an.Object.and.have.property('uuid').with.a.lengthOf(36)
+ response.entity.should.be.an.Object.with.property('uuid').with.a.lengthOf(36)
})
it('response.entity.author should equal "Sir Arthur Conan Doyle"', function() {
@@ -146,7 +148,7 @@
})
it('response.entity should exist and its uuid should the uuid from the previous POST requets', function() {
- response.entity.should.be.an.Object.and.have.property('uuid').equal(_uuid)
+ response.entity.should.be.an.Object.with.property('uuid').equal(_uuid)
})
it('response.entity.narrator should equal "Peter Doyle"', function() {