-
-
Save jaseflow/02e43a89910385b99ff2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| describe("ListController", function() { | |
| beforeEach(module("dashboard")); | |
| var $controller; | |
| beforeEach(inject(function(_$controller_) { | |
| $controller = _$controller_; | |
| })); | |
| describe("$scope.displayType", function() { | |
| var $scope, | |
| controller; | |
| beforeEach(function() { | |
| $scope = {}; | |
| controller = $controller("ListCtrl", {$scope: $scope}); | |
| }); | |
| it("changes from list to grid", function() { | |
| $scope.displayType = "list"; | |
| $scope.toggleView(); | |
| expect($scope.displayType).toEqual("grid"); | |
| }); | |
| it("changes from grid to list", function() { | |
| $scope.displayType = "grid"; | |
| $scope.toggleView(); | |
| expect($scope.displayType).toEqual("list"); | |
| }); | |
| }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment