Sha256: 1875fb4c85d791ae8c5610b72c867a21289a178cf950bf39db4f5c4dcb9e007a
Contents?: true
Size: 873 Bytes
Versions: 2
Compression:
Stored size: 873 Bytes
Contents
describe('ListKeysController', function(){ describe('keys', function(){ var scope, location; // mocking keys resource to return [] var keysResource = { get: function(){ return []; } } beforeEach(module('memcached-keys')); beforeEach(inject(function($rootScope, $controller, $location){ location = $location; scope = $rootScope.$new(); ctrl = $controller('ListKeysController', { $scope: scope, Keys: keysResource, $state: { transitionTo: function() { location.path('/'); } } }); })); it('sets up the keys attribute with Keys resource call', function(){ expect(scope.keys).toEqual([]); }); it('should show keys', function() { scope.showKeys(); expect(location.path()).toBe('/'); }) }); });
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
memcached-manager-0.2.3 | spec/javascripts/angular/controllers/list_keys_controller_spec.js |
memcached-manager-0.2.2 | spec/javascripts/angular/controllers/list_keys_controller_spec.js |