Skip to content

Commit

Permalink
Tweak id/className test.
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Aug 8, 2012
1 parent 41333df commit 2810143
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/view.js
Expand Up @@ -136,16 +136,17 @@ $(document).ready(function() {
});

test("View: with className and id functions", 2, function() {
var viewClass = Backbone.View.extend({
var View = Backbone.View.extend({
className: function() {
return 'one';
return 'className';
},
id: function() {
return 'two';
return 'id';
}
});
equal((new viewClass).el.className, 'one');
equal((new viewClass).el.id, 'two');
var view = new View();
strictEqual(view.el.className, 'className');
strictEqual(view.el.id, 'id');
});

test("View: with attributes", 2, function() {
Expand Down

0 comments on commit 2810143

Please sign in to comment.