Commit 05e0cd83 authored by Sean Hammond's avatar Sean Hammond

Fix a failing test

parent bf0a27c9
...@@ -209,10 +209,20 @@ describe 'annotation', -> ...@@ -209,10 +209,20 @@ describe 'annotation', ->
controller.render() controller.render()
assert.equal(controller.document.title, 'example.com') assert.equal(controller.document.title, 'example.com')
it 'skips the document object if no document is present on the annotation', -> it 'still sets the uri correctly if the annotation has no document', ->
delete annotation.document delete annotation.document
controller.render() controller.render()
assert.isNull(controller.document) assert(controller.document.uri == $scope.annotation.uri)
it 'still sets the domain correctly if the annotation has no document', ->
delete annotation.document
controller.render()
assert(controller.document.domain == 'example.com')
it 'uses the domain for the title when the annotation has no document', ->
delete annotation.document
controller.render()
assert(controller.document.title == 'example.com')
describe 'when there are no targets', -> describe 'when there are no targets', ->
beforeEach -> 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