Commit 6656faed authored by Phil Hughes's avatar Phil Hughes

Tests for not logged in user

parent 03ea267f
......@@ -433,6 +433,7 @@ feature 'Diff notes resolve', feature: true, js: true do
end
context 'unauthorized user' do
context 'no resolved comments' do
before do
visit_merge_request
end
......@@ -448,6 +449,28 @@ feature 'Diff notes resolve', feature: true, js: true do
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)
mr = mr || merge_request
visit namespace_project_merge_request_path(mr.project.namespace, mr.project, mr)
......
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