Skip to content

Commit

Permalink
Fix WiringAware test which was not actually fetching a real object fr…
Browse files Browse the repository at this point in the history
…om the container
  • Loading branch information
Jason Johnston committed Oct 19, 2009
1 parent e55a294 commit 9ade116
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js-wiring-test.html
Expand Up @@ -2,6 +2,7 @@
<head>
<title>JS Wiring Tests</title>
<script type="text/javascript" src="js-wiring.js"></script>
<script type="text/javascript" src="js-wiring-debug.js"></script>
<style type="text/css">
html, body {font-family: sans-serif;}
h1 {font-size: 1.2em;}
Expand Down Expand Up @@ -67,7 +68,7 @@ <h1>JS Wiring Tests</h1>
function TestWiringAwareSub() {};
TestWiringAwareSub.prototype = new Wiring.WiringAware();
TestWiringAwareSub.prototype.getFoo1 = function() {
return this.wiring.get( 'foo1' );
return this.wiring.get( 'testWiringAwareTarget' );
};

function TestValueResolver() {};
Expand Down Expand Up @@ -363,10 +364,11 @@ <h1>JS Wiring Tests</h1>
Wiring.add( {
testWiringAware: {
type: TestWiringAwareSub
}
},
testWiringAwareTarget: {}
} );
var obj = Wiring.get( 'testWiringAware' );
return obj.wiring === Wiring && obj.getFoo1() === Wiring.get( 'foo1' );
return obj.wiring === Wiring && obj.getFoo1() === Wiring.get( 'testWiringAwareTarget' );
} );

runTest( 'Custom ValueResolver', function() {
Expand Down

0 comments on commit 9ade116

Please sign in to comment.