@@ -96,22 +96,6 @@ describe('angular-confirm', function() {
9696 expect ( settings . template ) . not . toBeDefined ( ) ;
9797 } ) ;
9898
99- it ( "should provide default button class names" , function ( ) {
100- expect ( $confirmModalDefaults . defaultLabels . okClass ) . toEqual ( 'primary' ) ;
101- expect ( $confirmModalDefaults . defaultLabels . cancelClass ) . toEqual ( 'default' ) ;
102- var settings = $confirm ( { } ) ;
103- var data = settings . resolve . data ( ) ;
104- expect ( data . okClass ) . toEqual ( 'primary' ) ;
105- expect ( data . cancelClass ) . toEqual ( 'default' ) ;
106- } ) ;
107-
108- it ( "should override default class names" , function ( ) {
109- var settings = $confirm ( { okClass : "danger" , cancelClass : "warning" } ) ;
110- var data = settings . resolve . data ( ) ;
111- expect ( data . okClass ) . toEqual ( 'danger' ) ;
112- expect ( data . cancelClass ) . toEqual ( 'warning' ) ;
113- } ) ;
114-
11599 } ) ;
116100
117101 describe ( 'confirm directive' , function ( ) {
@@ -221,25 +205,6 @@ describe('angular-confirm', function() {
221205 } ) ;
222206 } ) ;
223207
224- describe ( 'with confirmOk and confirmOkClass option' , function ( ) {
225- beforeEach ( angular . mock . inject ( function ( $compile ) {
226- $scope . name = 'Joe' ;
227- element = angular . element ( '<button type="button" ng-click="click()" confirm="Are you sure?" confirm-ok="Okie Dokie, {{name}}!" confirm-ok-class="danger">Delete</button>' ) ;
228- $compile ( element ) ( $scope ) ;
229- $scope . $digest ( ) ;
230- } ) ) ;
231-
232- it ( "should resolve the confirmTitle to the title property" , function ( ) {
233- element . triggerHandler ( 'click' ) ;
234- $timeout . flush ( ) ;
235- expect ( data . ok ) . toEqual ( 'Okie Dokie, Joe!' ) ;
236- } ) ;
237-
238- it ( "should use confirmOkClass to the provided value" , function ( ) {
239- expect ( data . okClass ) . toEqual ( 'danger' ) ;
240- } ) ;
241- } ) ;
242-
243208 describe ( 'with confirmCancel option' , function ( ) {
244209 beforeEach ( angular . mock . inject ( function ( $compile ) {
245210 $scope . name = 'Joe' ;
@@ -255,25 +220,6 @@ describe('angular-confirm', function() {
255220 } ) ;
256221 } ) ;
257222
258- describe ( 'with confirmCancel and cancelClass option' , function ( ) {
259- beforeEach ( angular . mock . inject ( function ( $compile ) {
260- $scope . name = 'Joe' ;
261- element = angular . element ( '<button type="button" ng-click="click()" confirm="Are you sure?" confirm-cancel="No Way, {{name}}!" confirm-cancel-class="warning">Delete</button>' ) ;
262- $compile ( element ) ( $scope ) ;
263- $scope . $digest ( ) ;
264- } ) ) ;
265-
266- it ( "should resolve the confirmTitle to the title property" , function ( ) {
267- element . triggerHandler ( 'click' ) ;
268- $timeout . flush ( ) ;
269- expect ( data . cancel ) . toEqual ( 'No Way, Joe!' ) ;
270- } ) ;
271-
272- it ( "should use confirmCancelClass to the provided value" , function ( ) {
273- expect ( data . cancelClass ) . toEqual ( 'warning' ) ;
274- } ) ;
275- } ) ;
276-
277223 describe ( 'with confirmSettings option' , function ( ) {
278224 beforeEach ( angular . mock . inject ( function ( $compile ) {
279225 $scope . settings = { name : 'Joe' } ;
0 commit comments