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
4102d301
Commit
4102d301
authored
Sep 24, 2015
by
Sean Hammond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for shouldShowThread()
parent
6ebf0412
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
widget-controller-test.coffee
h/static/scripts/test/widget-controller-test.coffee
+31
-0
No files found.
h/static/scripts/test/widget-controller-test.coffee
View file @
4102d301
...
...
@@ -86,3 +86,34 @@ describe 'WidgetController', ->
assert
.
calledWith
(
loadSpy
,
[
40
..
59
])
assert
.
calledWith
(
loadSpy
,
[
60
..
79
])
assert
.
calledWith
(
loadSpy
,
[
80
..
99
])
describe
'shouldShowThread()'
,
->
it
'returns false for orphan annotations'
,
->
# Turn the 'show_unanchored_annotations' feature off.
$scope
.
feature
=
->
false
container
=
message
:
$orphan
:
true
assert
(
$scope
.
shouldShowThread
(
container
)
is
false
)
it
'returns true for non-orphan annotations'
,
->
# Turn the 'show_unanchored_annotations' feature off.
$scope
.
feature
=
->
false
container
=
message
:
$orphan
:
false
assert
(
$scope
.
shouldShowThread
(
container
)
is
true
)
it
'returns true for orphan annotations if show_unanchored_annotations is on'
,
->
# Turn the 'show_unanchored_annotations' feature on.
$scope
.
feature
=
->
true
container
=
message
:
$orphan
:
true
assert
(
$scope
.
shouldShowThread
(
container
)
is
true
)
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