Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
6656faed
Commit
6656faed
authored
Jul 29, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for not logged in user
parent
03ea267f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
7 deletions
+30
-7
spec/features/merge_requests/diff_notes_resolve_spec.rb
spec/features/merge_requests/diff_notes_resolve_spec.rb
+30
-7
No files found.
spec/features/merge_requests/diff_notes_resolve_spec.rb
View file @
6656faed
...
@@ -433,6 +433,7 @@ feature 'Diff notes resolve', feature: true, js: true do
...
@@ -433,6 +433,7 @@ feature 'Diff notes resolve', feature: true, js: true do
end
end
context
'unauthorized user'
do
context
'unauthorized user'
do
context
'no resolved comments'
do
before
do
before
do
visit_merge_request
visit_merge_request
end
end
...
@@ -448,6 +449,28 @@ feature 'Diff notes resolve', feature: true, js: true do
...
@@ -448,6 +449,28 @@ feature 'Diff notes resolve', feature: true, js: true do
end
end
end
end
context
'resolved comment'
do
before
do
note
.
resolve!
(
user
)
visit_merge_request
end
it
'shows resolved icon'
do
expect
(
page
).
to
have_content
'1/1 discussion resolved'
click_link
'Toggle discussion'
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-active'
)
end
it
'does not allow user to click resolve button'
do
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-disabled'
)
click_link
'Toggle discussion'
expect
(
page
).
to
have_selector
(
'.line-resolve-btn.is-disabled'
)
end
end
end
def
visit_merge_request
(
mr
=
nil
)
def
visit_merge_request
(
mr
=
nil
)
mr
=
mr
||
merge_request
mr
=
mr
||
merge_request
visit
namespace_project_merge_request_path
(
mr
.
project
.
namespace
,
mr
.
project
,
mr
)
visit
namespace_project_merge_request_path
(
mr
.
project
.
namespace
,
mr
.
project
,
mr
)
...
...
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