|
@@ -94,4 +94,23 @@ describe('App.MainAdminKerberosController', function() {
|
|
|
expect(App.showClusterCheckPopup.called).to.be.false;
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ describe('#regenerateKeytabs()', function () {
|
|
|
+
|
|
|
+ beforeEach(function () {
|
|
|
+ sinon.spy(App, "showConfirmationPopup");
|
|
|
+ sinon.stub(App.ajax, 'send', Em.K);
|
|
|
+ });
|
|
|
+ afterEach(function () {
|
|
|
+ App.showConfirmationPopup.restore();
|
|
|
+ App.ajax.send.restore();
|
|
|
+ });
|
|
|
+
|
|
|
+ it('confirm popup should be displayed', function () {
|
|
|
+ var popup = controller.regenerateKeytabs();
|
|
|
+ expect(App.showConfirmationPopup.calledOnce).to.be.true;
|
|
|
+ popup.onPrimary();
|
|
|
+ expect(App.ajax.send.calledOnce).to.be.true;
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|