diff --git a/app/assets/javascripts/services/generic_object_subscription_service.js b/app/assets/javascripts/services/generic_object_subscription_service.js deleted file mode 100644 index 162ce375862..00000000000 --- a/app/assets/javascripts/services/generic_object_subscription_service.js +++ /dev/null @@ -1,21 +0,0 @@ -ManageIQ.angular.app.service('genericObjectSubscriptionService', ['subscriptionService', function(subscriptionService) { - this.subscribeToShowAddForm = function(callback) { - subscriptionService.subscribeToEventType('showAddForm', callback); - }; - - this.subscribeToShowEditForm = function(callback) { - subscriptionService.subscribeToEventType('showEditForm', callback); - }; - - this.subscribeToDeleteGenericObject = function(callback) { - subscriptionService.subscribeToEventType('deleteGenericObject', callback); - }; - - this.subscribeToTreeClicks = function(callback) { - subscriptionService.subscribeToEventType('treeClicked', callback); - }; - - this.subscribeToRootTreeclicks = function(callback) { - subscriptionService.subscribeToEventType('rootTreeClicked', callback); - }; -}]); diff --git a/spec/javascripts/services/generic_object_subscription_service_spec.js b/spec/javascripts/services/generic_object_subscription_service_spec.js deleted file mode 100644 index 24feb123460..00000000000 --- a/spec/javascripts/services/generic_object_subscription_service_spec.js +++ /dev/null @@ -1,64 +0,0 @@ -describe('genericObjectSubscriptionService', function() { - var testService; - var subscriptionService; - var callback = function() {}; - - beforeEach(module('ManageIQ')); - - beforeEach(inject(function(_subscriptionService_, genericObjectSubscriptionService) { - testService = genericObjectSubscriptionService; - subscriptionService = _subscriptionService_; - - spyOn(subscriptionService, 'subscribeToEventType'); - })); - - describe('#subscribeToShowAddForm', function() { - beforeEach(function() { - testService.subscribeToShowAddForm(callback); - }); - - it('subscribes', function() { - expect(subscriptionService.subscribeToEventType).toHaveBeenCalledWith('showAddForm', callback); - }); - }); - - describe('#subscribeToShowEditForm', function() { - beforeEach(function() { - testService.subscribeToShowEditForm(callback); - }); - - it('subscribes', function() { - expect(subscriptionService.subscribeToEventType).toHaveBeenCalledWith('showEditForm', callback); - }); - }); - - describe('#subscribeToDeleteGenericObject', function() { - beforeEach(function() { - testService.subscribeToDeleteGenericObject(callback); - }); - - it('subscribes', function() { - expect(subscriptionService.subscribeToEventType).toHaveBeenCalledWith('deleteGenericObject', callback); - }); - }); - - describe('#subscribeToTreeClicks', function() { - beforeEach(function() { - testService.subscribeToTreeClicks(callback); - }); - - it('subscribes', function() { - expect(subscriptionService.subscribeToEventType).toHaveBeenCalledWith('treeClicked', callback); - }); - }); - - describe('#subscribeToRootTreeclicks', function() { - beforeEach(function() { - testService.subscribeToRootTreeclicks(callback); - }); - - it('subscribes', function() { - expect(subscriptionService.subscribeToEventType).toHaveBeenCalledWith('rootTreeClicked', callback); - }); - }); -});