@@ -75,6 +75,22 @@ describe('MdRadio', () => {
7575 expect ( radioInstances [ 0 ] . checked ) . toBe ( false ) ;
7676 } ) ;
7777
78+ it ( 'should set alignment based on the group alignment' , ( ) => {
79+ testComponent . alignment = 'end' ;
80+ fixture . detectChanges ( ) ;
81+
82+ for ( let radio of radioInstances ) {
83+ expect ( radio . align ) . toBe ( 'end' ) ;
84+ }
85+
86+ testComponent . alignment = 'start' ;
87+ fixture . detectChanges ( ) ;
88+
89+ for ( let radio of radioInstances ) {
90+ expect ( radio . align ) . toBe ( 'start' ) ;
91+ }
92+ } ) ;
93+
7894 it ( 'should disable each individual radio when the group is disabled' , ( ) => {
7995 testComponent . isGroupDisabled = true ;
8096 fixture . detectChanges ( ) ;
@@ -452,14 +468,18 @@ describe('MdRadio', () => {
452468@Component ( {
453469 directives : [ MD_RADIO_DIRECTIVES ] ,
454470 template : `
455- <md-radio-group [disabled]="isGroupDisabled" [value]="groupValue" name="test-name">
471+ <md-radio-group [disabled]="isGroupDisabled"
472+ [align]="alignment"
473+ [value]="groupValue"
474+ name="test-name">
456475 <md-radio-button value="fire">Charmander</md-radio-button>
457476 <md-radio-button value="water">Squirtle</md-radio-button>
458477 <md-radio-button value="leaf">Bulbasaur</md-radio-button>
459478 </md-radio-group>
460479 `
461480} )
462481class RadiosInsideRadioGroup {
482+ alignment : string ;
463483 isGroupDisabled : boolean = false ;
464484 groupValue : string = null ;
465485}
0 commit comments