Permalink
Browse files

[test] added test for two attributes update plus body update

  • Loading branch information...
pgte committed Aug 23, 2012
1 parent 78cea8f commit 40cb8b754668b032476785b773924dc305937c5a
Showing with 20 additions and 1 deletion.
  1. +13 −1 test/api-test.js
  2. +1 −0 test/fixtures/test-25.html
  3. +5 −0 test/fixtures/test-25.json
  4. +1 −0 test/fixtures/test-25.out
View
@@ -274,7 +274,7 @@ vows.describe('merge data into markup').addBatch({
),
- '(24) Two maps for two attributes should update both attributes': (
+ '(24) Two maps for thr same class, updating two attributes should update both attributes': (
function() {
var map = Plates.Map();
@@ -283,6 +283,18 @@ vows.describe('merge data into markup').addBatch({
return common.createTest('test-24', map);
}()
+ ),
+
+ '(25) Two maps for thr same class, updating two attributes plus a body class map should update both attributes': (
+
+ function() {
+ var map = Plates.Map();
+ map.class('author').use('url').as('href');
+ map.class('author').use('class').as('class');
+ map.class('author').to('name');
+
+ return common.createTest('test-25', map);
+ }()
)
@@ -0,0 +1 @@
+<a class="author" href=""></a>
@@ -0,0 +1,5 @@
+{
+ "name": "The Name",
+ "class": "class1 author",
+ "url": "//the.url.com/abc"
+}
@@ -0,0 +1 @@
+<a class="class1 author" href="//the.url.com/abc">The Name</a>

0 comments on commit 40cb8b7

Please sign in to comment.