Commit 90be6516 authored by Aron Carroll's avatar Aron Carroll

Merge pull request #1807 from hypothesis/1799-default-public-visibility

Default to public visibility on annotations.
parents 3972fe21 6a44f65b
......@@ -64,7 +64,7 @@ privacy = ['$window', ($window) ->
controller.$render = ->
unless controller.$modelValue.read.length
name = storage.getItem VISIBILITY_KEY
name ?= VISIBILITY_PRIVATE
name ?= VISIBILITY_PUBLIC
level = getLevel(name)
controller.$setViewValue level
......
......@@ -89,12 +89,12 @@ describe 'h.directives.privacy', ->
beforeEach ->
store.removeItem VISIBILITY_KEY
it 'defaults to private', ->
it 'defaults to public', ->
$scope.permissions = {read: []}
$element = $compile('<privacy ng-model="permissions">')($scope)
$scope.$digest()
$isolateScope = $element.isolateScope()
assert.equal $isolateScope.level.name, VISIBILITY_PRIVATE
assert.equal $isolateScope.level.name, VISIBILITY_PUBLIC
describe 'when permissions.read is empty', ->
beforeEach ->
......
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