\ No newline at end of file
diff --git a/src/buttons/docs/readme.md b/src/buttons/docs/readme.md
index 73ef6003d1..82e736b107 100644
--- a/src/buttons/docs/readme.md
+++ b/src/buttons/docs/readme.md
@@ -1,2 +1 @@
-There are 2 directives that can make a group of buttons to behave like a set of checkboxes or radio buttons.
-
+There are two directives that can make a group of buttons behave like a set of checkboxes, radio buttons, or a hybrid where radio buttons can be unchecked.
diff --git a/src/buttons/test/buttons.spec.js b/src/buttons/test/buttons.spec.js
index 5b4db2c42c..4774b8b5c8 100644
--- a/src/buttons/test/buttons.spec.js
+++ b/src/buttons/test/buttons.spec.js
@@ -136,5 +136,53 @@ describe('buttons', function () {
expect(btns.eq(0)).not.toHaveClass('active');
expect(btns.eq(1)).toHaveClass('active');
});
+
+ describe('uncheckable', function () {
+ //model -> UI
+ it('should set active class based on model', function () {
+ var btns = compileButtons('', $scope);
+ expect(btns.eq(0)).not.toHaveClass('active');
+ expect(btns.eq(1)).not.toHaveClass('active');
+
+ $scope.model = 2;
+ $scope.$digest();
+ expect(btns.eq(0)).not.toHaveClass('active');
+ expect(btns.eq(1)).toHaveClass('active');
+ });
+
+ //UI->model
+ it('should unset active class based on model', function () {
+ var btns = compileButtons('', $scope);
+ expect($scope.model).toBeUndefined();
+
+ btns.eq(0).click();
+ expect($scope.model).toEqual(1);
+ expect(btns.eq(0)).toHaveClass('active');
+ expect(btns.eq(1)).not.toHaveClass('active');
+
+ btns.eq(0).click();
+ expect($scope.model).toEqual(undefined);
+ expect(btns.eq(1)).not.toHaveClass('active');
+ expect(btns.eq(0)).not.toHaveClass('active');
+ });
+
+ it('should watch btn-radio values and update state', function () {
+ $scope.values = ['value1', 'value2'];
+
+ var btns = compileButtons('', $scope);
+ expect(btns.eq(0)).not.toHaveClass('active');
+ expect(btns.eq(1)).not.toHaveClass('active');
+
+ $scope.model = 'value2';
+ $scope.$digest();
+ expect(btns.eq(0)).not.toHaveClass('active');
+ expect(btns.eq(1)).toHaveClass('active');
+
+ $scope.model = undefined;
+ $scope.$digest();
+ expect(btns.eq(0)).not.toHaveClass('active');
+ expect(btns.eq(1)).not.toHaveClass('active');
+ });
+ });
});
});
\ No newline at end of file