Commit b67e333c authored by Jarka Kadlecova's avatar Jarka Kadlecova

fix static_analysis (rubocop)

parent 240d262d
......@@ -889,8 +889,7 @@ describe Projects::IssuesController do
it 'returns discussion json' do
get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
expect(JSON.parse(response.body).first.keys).to match_array(
['id', 'reply_id', 'expanded', 'notes', 'individual_note'])
expect(JSON.parse(response.body).first.keys).to match_array(%w[id reply_id expanded notes individual_note])
end
end
end
......@@ -50,7 +50,6 @@ feature 'Issue notes polling', :js do
expect(page).to have_selector(".alert")
end
it 'when editing but you changed some things, an update comes in, and you press cancel, show the updated content' do
click_edit_action(existing_note)
......
......@@ -76,15 +76,14 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).not_to have_selector menu_selector
end
it 'clicking the ul padding or divider should not change the text' do
find(menu_selector).trigger 'click'
if resource_name == 'issue'
find(menu_selector).trigger 'click'
expect(find(dropdown_selector)).to have_content 'Comment'
find(toggle_selector).click
find("#{menu_selector} .divider").trigger 'click'
expect(find(dropdown_selector)).to have_content 'Comment'
else
find(menu_selector).trigger 'click'
......@@ -94,8 +93,9 @@ shared_examples 'discussion comments' do |resource_name|
find("#{menu_selector} .divider").trigger 'click'
expect(page).to have_selector menu_selector
expect(find(dropdown_selector)).to have_content 'Comment'
end
expect(find(dropdown_selector)).to have_content 'Comment'
end
describe 'when selecting "Start discussion"' do
......
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