The failing test follows..
The submitted code contradicts the test. The test was supposed to
insure that the returned object was a copy of the data, not a reference.
Anyone know what the correct behavior is?
DataContextTest.prototype.testPutDataSet = function() {
var context = opensocial.data.getDataContext();
context.putDataSet('key', 'value');
this.assertEquals('value', context.getDataSet('key'));
// Test that putting null and undefined don't change the value.
// TODO: this seems wrong; why not support removing data?
context.putDataSet('key', null);
this.assertEquals('value', context.getDataSet('key'));
context.putDataSet('key', undefined);
this.assertEquals('value', context.getDataSet('key'));
};
On Apr 30, 2009, at 3:04 PM, Vincent Siveton wrote:
Hi,
Hudson is not happy after this commit
http://hudson.zones.apache.org/hudson/view/Shindig/job/Shindig/679/
Ok it is not a new requirement: why we *can't* add a notifier to dev@
for Hudson?
If technically we can't, I don't think a CI is useful for the
community.
Cheers,
Vincent
2009/4/30 <[email protected]>:
Author: doll
Date: Thu Apr 30 18:50:45 2009
New Revision: 770391
URL: http://svn.apache.org/viewvc?rev=770391&view=rev
Log:
Patch from Lev Epshteyn for opensocial templates.
Fixes bug when fetching data for template rendering.
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/
opensocial-data-context/datacontext.js
Modified: incubator/shindig/trunk/features/src/main/javascript/
features/opensocial-data-context/datacontext.js
URL:
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data-context/datacontext.js?rev=770391&r1=770390&r2=770391&view=diff
=
=
=
=
=
=
=
=
=
=====================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/
opensocial-data-context/datacontext.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/
opensocial-data-context/datacontext.js Thu Apr 30 18:50:45 2009
@@ -182,20 +182,12 @@
return {
/**
- * Returns a map of existing data. This is used externally by
both the
- * opensocial-data and opensocial-templates feature, hence is
- * not hidden, despite not being part of the spec.
+ * Returns a map of existing data.
* @return {Object} A map of current data sets.
* TODO: Add to the spec API?
*/
getData : function() {
- var data = {};
- for (var key in dataSets) {
- if (dataSets.hasOwnProperty(key)) {
- data[key] = dataSets[key];
- }
- }
- return data;
+ return dataSets;
},
/**
@@ -263,4 +255,3 @@
opensocial.data.getDataContext = function() {
return opensocial.data.DataContext;
};
-