Commits

remosu committed a28646f

some formatting changes in source code

Comments (0)

Files changed (2)

test/acceptance/backmongo.js

 
 jQuery.support.cors = true;
 jQuery.ajaxSettings.xhr = function () {
-    return new XMLHttpRequest;
-}
+    return new XMLHttpRequest();
+};
 
 var BMModel = Backbone.Model.extend({
     idAttribute: "_id",
 
 var BMCollection = Backbone.Collection.extend({
     model: BMModel,
-    url: 'http://localhost:5000/collection_tests/'         
+    url: 'http://localhost:5000/collection_tests/'
 });
 
 
 
     beforeEach(function(){
          bmcollection = new BMCollection();
-    });  
-        
+    });
+
     it("is defined", function(){
         bmcollection.should.not.equal(undefined);
     });
 
     describe("read all", function(){
         var expected;
-   
+
         beforeEach(function(done){
             bmcollection.fetch({success: function(){
                 done();
                 return model.get('name') == 'paco';
             });
             should.exist(model);
-            model.id.substr(0, 4).should.equal('oid_');     
+            model.id.substr(0, 4).should.equal('oid_');
         });
     });
 
             var model = bmcollection.find(function(model){
                 return model.get('_id') == '2';
             });
-            should.not.exist(model);     
+            should.not.exist(model);
         });
     });
 
 
         it("update the right one", function(){
             var model = bmcollection.find(function(model){
-                return model.id == '1' && 
+                return model.id == '1' &&
                     model.get('name') == 'pepito' && model.get('age') == 36;
             });
-            should.exist(model);     
+            should.exist(model);
         });
     });
 });

test/acceptance/mongodb_setup.py

 CONNECTION[DATABASE].drop_collection("collection_tests")
 collection_tests = CONNECTION[DATABASE]['collection_tests']
 
-collection_tests.insert({'_id': '1', 'name':'manolo', 'age':36})
-collection_tests.insert({'_id': '2', 'name':'silvio', 'age':31})
+collection_tests.insert({'_id': '1', 'name': 'manolo', 'age': 36})
+collection_tests.insert({'_id': '2', 'name': 'silvio', 'age': 31})