<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Example - example-radio-input-directive-production</title>
  
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.14/angular.min.js"></script>
  
</head>
<body ng-app="radioExample">
   <script>
   angular.module('radioExample', [])
     .controller('ExampleController', ['$scope', function($scope) {
       $scope.color = 'blue';
       $scope.specialValue = {
         "id": "12345",
         "value": "green"
       };
       
       $scope.submitForm = function() {
         alert('valid');
       }
       
     }]);
 </script>
 <form name="myForm" ng-submit="submitForm()" ng-controller="ExampleController">
   <input type="radio" ng-model="color" value="red" required>  Red <br/>
   <input type="radio" ng-model="color" value="green" required> Green <br/>
   <input type="radio" ng-model="color" value="blue" required> Blue <br/>
   <tt>color = {{color | json}}</tt><br/>
   <button type="submit">Submit</button>
  </form>

</body>
</html>
  it('should change state', function() {
    var color = element(by.binding('color'));

    expect(color.getText()).toContain('blue');

    element.all(by.model('color')).get(0).click();

    expect(color.getText()).toContain('red');
  });