Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
a2040d37
Commit
a2040d37
authored
Jul 21, 2015
by
Sean Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an annotation-viewer-controller.coffee test
parent
47a03b87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
annotation-viewer-controller-test.coffee
...tic/scripts/test/annotation-viewer-controller-test.coffee
+6
-2
No files found.
h/static/scripts/test/annotation-viewer-controller-test.coffee
View file @
a2040d37
...
...
@@ -30,13 +30,13 @@ describe "AnnotationViewerController", ->
$scope
:
$scope
or
{
search
:
{}}
streamer
:
streamer
or
{
send
:
->
}
store
:
store
or
{
AnnotationResource
:
{
read
:
->
},
AnnotationResource
:
{
read
:
sinon
.
spy
()
},
SearchResource
:
{
get
:
->
}}
streamFilter
:
streamFilter
or
{
setMatchPolicyIncludeAny
:
->
{
addClause
:
->
{
addClause
:
->
}}
getFilter
:
->
}
annotationMapper
:
annotationMapper
or
{}
annotationMapper
:
annotationMapper
or
{
loadAnnotations
:
sinon
.
spy
()
}
}
locals
[
"ctrl"
]
=
getControllerService
()(
"AnnotationViewerController"
,
locals
)
...
...
@@ -45,3 +45,7 @@ describe "AnnotationViewerController", ->
it
"sets the isEmbedded property to false"
,
->
{
$scope
}
=
createAnnotationViewerController
({})
assert
.
isFalse
(
$scope
.
isEmbedded
)
it
"calls the annotation API to get the annotation"
,
->
{
store
}
=
createAnnotationViewerController
({})
assert
store
.
AnnotationResource
.
read
.
args
[
0
][
0
].
id
==
"test_annotation_id"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment