Commit a2ad0017 authored by Aron Carroll's avatar Aron Carroll Committed by Randall Leeds

Hide the account management sheet on load

parent 7bb363b4
......@@ -32,6 +32,9 @@ class AccountManagement
$scope.changePassword = {}
$scope.deleteAccount = {}
# Initial form state.
$scope.sheet = false
$scope.delete = (form) ->
# If the password is correct, the account is deleted.
# The extension is then removed from the page.
......
......@@ -43,6 +43,21 @@ describe 'h.controllers.AccountManagement', ->
createController = ->
$controller('AccountManagement', {$scope: $scope})
it 'hides the sheet by default', ->
controller = createController()
assert.isFalse($scope.sheet)
describe 'event subscriptions', ->
it 'should show the sheet on "nav:account" event', ->
controller = createController()
$scope.$emit('nav:account')
assert.isTrue($scope.sheet)
it 'should hide the sheet on "logout" event', ->
controller = createController()
$scope.$emit('logout')
assert.isFalse($scope.sheet)
describe '.submit', ->
createFakeForm = (overrides={}) ->
defaults =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment