Commit eddda6fd authored by ujvari's avatar ujvari Committed by Randall Leeds

Fix privacy tests

parent f70fde7e
......@@ -17,7 +17,6 @@ describe 'h.directives.privacy', ->
describe 'memory fallback', ->
fakeAuth = null
fakeWindow = null
sandbox = null
beforeEach module ($provide) ->
......@@ -27,24 +26,23 @@ describe 'h.directives.privacy', ->
user: 'acct:angry.joe@texas.com'
}
fakeWindow = {
localStorage: undefined
}
$provide.value 'auth', fakeAuth
$provide.value '$window', fakeWindow
return
afterEach ->
sandbox.restore()
describe 'has memory fallback', ->
$window = null
$scope2 = null
beforeEach inject (_$compile_, _$rootScope_) ->
beforeEach inject (_$compile_, _$rootScope_, _$window_) ->
$compile = _$compile_
$scope = _$rootScope_.$new()
$scope2 = _$rootScope_.$new()
$window = _$window_
$window.localStorage = null
it 'stores the default visibility level when it changes', ->
$scope.permissions = {read: ['acct:user@example.com']}
......
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