Permalink
Browse files

Add a test for 'fields'

  • Loading branch information...
1 parent 4bb65be commit 3b1e0c3e358da5c6e5a142c632a194cddcb48fef @itay itay committed Apr 9, 2012
Showing with 7 additions and 1 deletion.
  1. +1 −1 lib/service.js
  2. +6 −0 tests/test_service.js
View
@@ -731,7 +731,7 @@
// Take out the entity-specific content
this._properties = properties.content || {};
- this._fields = properties.fields || {};
+ this._fields = properties.fields || this._fields || {};
this._acl = properties.acl || {};
this._links = properties.links || {};
this._author = properties.author || null;
View
@@ -1085,6 +1085,12 @@ exports.setup = function(svc) {
test.strictEqual(search.properties().search, updatedSearch);
test.strictEqual(search.properties().description, updatedDescription);
+ search.refresh(done);
+ },
+ function(search, done) {
+ // Verify that we have the required fields
+ test.strictEqual(search.fields().required[0], "search");
+
search.remove(done);
}
],

0 comments on commit 3b1e0c3

Please sign in to comment.