Skip to content

Commit

Permalink
add test for registered behavior affecting a value then used by fea…
Browse files Browse the repository at this point in the history
…tures
  • Loading branch information
Scott J Miles committed Aug 25, 2015
1 parent 9734a3a commit 230528c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/unit/behaviors-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,28 @@

</script>

</dom-module>

<dom-module id="registration-behaviors">

<script>

Polymer.registerBehavior ={
registered: function() {
this.is = this.as;
}
};

Polymer({

behaviors: [
Polymer.registerBehavior
],

as: 'behavior-as-is'

});

</script>

</dom-module>
5 changes: 5 additions & 0 deletions test/unit/behaviors.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
assert.equal(typeof el._setHasOptionsA, 'function');
});

test('registered behavior', function() {
var el = document.createElement('behavior-as-is');
assert.equal(el.is, 'behavior-as-is');
});

});

suite('multi-behaviors element', function() {
Expand Down

0 comments on commit 230528c

Please sign in to comment.