Skip to content

Commit

Permalink
Fixing the observable lists with mustache test.
Browse files Browse the repository at this point in the history
  • Loading branch information
andykant committed Jan 7, 2013
1 parent b259f59 commit 503a336
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions view/mustache/test/mustache_test.js
Expand Up @@ -1311,7 +1311,7 @@ test("Rendering models in tables produces different results than an equivalent o

// http://forum.javascriptmvc.com/topic/live-binding-on-mustache-template-does-not-seem-to-be-working-with-nested-properties
test("Observe with array attributes", function() {
var renderer = can.view.mustache('<ul><li></li><li>{{todos.1}}</li>{{#todos}}<li>{{.}}</li>{{/todos}}</ul><div>{{message}}</div>');
var renderer = can.view.mustache('<ul>{{#todos}}<li>{{.}}</li>{{/todos}}</ul><div>{{message}}</div>');
var div = document.createElement('div');
var data = new can.Observe({
todos: [ 'Line #1', 'Line #2', 'Line #3' ],
Expand All @@ -1324,7 +1324,6 @@ test("Observe with array attributes", function() {
equal(div.getElementsByTagName('div')[0].innerHTML, 'Hello', 'Check initial message');

data.attr('todos.1', 'Line #2 changed');
// data.todos.attr('1', 'Line #2 changed');
data.attr('message', 'Hello again');

equal(div.getElementsByTagName('li')[1].innerHTML, 'Line #2 changed', 'Check updated array');
Expand Down

0 comments on commit 503a336

Please sign in to comment.